Connection to Couchbase Server N1QL query returns NULL


I have been able to connect the the cbq-engine via cbq cli tool and perform all types of queries. Its really cool. However when I try to use an sdk to to the same thing I see nothing but NULL as a result from the query.

Here is the sample code in php:
try {
$cb = new CouchbaseCluster($COUCHBASE_SERVER,’’,’’);
$bucket = $cb->openBucket($BUCKET,’’);
$query = CouchbaseN1qlQuery::fromString($SQL);
$res = $bucket->query($query);
}catch(CouchbaseException $e){

I have PHP SDK 2.0.3 and N1QL DP4 all running on ubuntu 14.04

Please help.

Thanks Much


Hi @layerxfounder, I’m pretty sure 2.0.3 is not yet compatible with DP4, since it is quite brand new.

I think @brett19 can give you more info on the timeline when it will be available for you in PHP to test. You can already in .NET and Java ( see our blog posts for announcements on that front ).



Your right. As Brett states it’s still a few weeks out. I did find a work around noted here: