PHP SDK 2.0.1 on Windows

Has anyone been able to get PHP SDK 2.0.1 to run on Windows IIS 7.5? I had it working fine with pre 2.0.x SDK builds. If I place the 2.0.1 php_couchbase.dll into the ext folder and leave the libcouchbase.dll in the root php directory, it returns the following error:

Fatal error: Uncaught exception ‘CouchbaseException’ with message ‘Invalid arguments’ in CouchbaseNative:182 Stack trace: #0 CouchbaseNative(182): _CouchbaseCluster->__construct(‘couchbase://xxx…’, ‘’, ‘’) #1 D:\Dropbox\WWW_dev\localhost\cb.php(5): CouchbaseCluster->__construct(‘couchbase://xxx…’) #2 {main} thrown in CouchbaseNative on line 182

If I remove libcouchbase.dll from the root php directory, I get the following error:

Fatal error: Class ‘CouchbaseCluster’ not found in D:\Dropbox\WWW_dev\localhost\cb.php on line 5

Any ideas?

EDIT: Here’s the PHP code I’m using, straight from the Couchbase PHP SDK 2.0 documentation:

$myCluster = new CouchbaseCluster(‘couchbase://xxx.xxx.xxx.xxx’);
$myBucket = $myCluster->openBucket(‘default’);

$res = $myBucket->get(‘document_name’);
echo 'Value: ’ . $res->value;

Hey fnsnoop,

This is a known issue and we are currently investigating, I will let you know as soon as we have something!
You can track progress here: https://www.couchbase.com/issues/browse/PCBC-310

Cheers, Brett

Hey fnsoop,

A new version of the PHP SDK was released today that may fix this issue you were encountering. If you would give it a shot and let me know, that would be fantastic!
Read more here: http://docs.couchbase.com/developer/php-2.0/release-notes.html

Cheers, Brett

Hi brett19,

I encountered a similar problem with notm84, but i’m using libcouchbase 2.0.2 for Windows. Please check the message :frowning:

Fatal error: Uncaught exception ‘CouchbaseException’ with message ‘Invalid arguments’ in CouchbaseNative:182 Stack trace: #0 CouchbaseNative(182): _CouchbaseCluster->__construct(‘10.2.36.8’, ‘’, ‘’)”

Before that, when I setup a lower version (v1.2) libcouchbase 2.0.x, it’s worked!

Hey quocvuongdn,

Due to an unfortunate issue in libcouchbase, you must pass a cluster configuration string that includes a scheme (ie: try couchbase://10.2.36.8, rather than just 10.2.36.8). We hope to get this fixed as soon as possible.

Cheers, Brett

I’m tried to add couchbase:// or add port number after IP string! It didn’t work! Hope a new version.

Thank you for your support!

Hey quocvuongdn,

Just to clarify, you’re performing new CouchbaseCluster('couchbase://10.2.36.8'); and receiving an ‘Invalid arguments’ error still?

Cheers, Brett

Hey quocvuongdn,

I just noticed the issue. Please use libcouchbase 2.4.2, 2.0.2 is not supported by the PHP 2.0.1 SDK.

Cheers, Brett

1 Like