PHP SDk 2.03 Uncaught exception

I am trying to do a basic connect.
I am positive the cb server is set correctly since it work great using sdk 1.2.2.

$cb = new CouchbaseCluster(‘’,’’,’’);
$myBucket = $cb->openBucket(“default”,’’);

I also tried CouchbaseCluster(‘couchbase://’)
and CouchbaseCluster(‘’)
with all sorts of combos using 8091 etc…

PHP 5.3.10-1ubuntu3.15
Couchbase PHP SDK 2.03


PHP Fatal error: Uncaught exception ‘CouchbaseException’ with message ‘Invalid input/arguments’ in [CouchbaseNative]/CouchbaseBucket.class.php:74
Stack trace:
#0 [CouchbaseNative]/CouchbaseBucket.class.php(74): _CouchbaseBucket->__construct(‘…’, ‘default’, ‘’)
#1 [CouchbaseNative]/CouchbaseCluster.class.php(61): CouchbaseBucket->__construct(‘…’, ‘default’, ‘’)
#2 /usr/share/nginx/_admin/n1ql.php(6): CouchbaseCluster->openBucket(‘default’)
#3 {main}
thrown in [CouchbaseNative]/CouchbaseBucket.class.php on line 74

Thank for any advise.


I fixed my own issue and wanted to share in case someone else has this issue.

I had a previous version of the couchbase c sdk library installed on my ubuntu server.
ldd showed
/usr/local/lib/ ->

when in fact it should have been pointing to
/usr/lib/x86_64-linux-gnu/ ->

I still need to use the 1.2.2 sdk for php-fpm to use while I test the new SDK at the command line. I simple export the library path while I’m testing

export LD_LIBRARY_PATH=/lib:/usr/lib/x86_64-linux-gnu

Things work as expected :smile: