Error installing php sdk 2.0 on windows

I installed Couchbase Server 3 on Windows and then tried to install the php client with pecl. When I run pecl install couchbase, I get the error:

ERROR: The DSP couchbase.dsp does not exist.

Then it just quits. Any help would be appreciated.

Scott Hathaway
Bell Helicopter

Hey Scott,

Unfortunately PECL does not support building extensions on Windows. You should instead grab the latest prebuilt version of the SDK that matches your installation environment, here are the links!

Cheers, Brett

I’ve also been trying to get the new (2.1) PHP Windows driver to work with my PHP installation. The only file that’s included in those zip files (that I can see), is the php_couchbase.dll file; along with package.xml & package2.xml.

In the previous version that works with Couchbase 2.x, there was another file ‘libcouchbase.dll’ that was included with the zip file.

Should this file or a newer iteration/version of this file coincide with the new PHP driver implementation for Couchbase 3.x?

Hey Erutan,

You will need to grab the latest version of the libcouchbase library (our C SDK) as well. I will make changes to ensure this is included by default in future releases of the library.

Cheers, Brett

Awesome. I’ll give this a try.

Thank you, Brett

I tried including the libcouchbase library from the C SDK (as you mentioned) and it didn’t seem to work when trying to load the PHP driver. Unless I misunderstood you, I think there’s still a knowledge gap as to how to make this work in a Windows environment.

Thank you for your assistance on this matter.

You should download the libcouchbase.dll that is appropriate for your platform and place it somewhere that will be loadable from PHP (in your PATH or php directory).

Cheers, Brett


I just downloaded the latest release of the PHP library and it still doesn’t have the libcouchbase library, bundled.


I seemed to have finally gotten the library to work, however when I do a phpinfo(), Couchbase’s section is completely void of any directive information. Is this intentional?

Hey Erutan409,

What directive information do you expect to see there?

Cheers, Brett

All of the directive information I saw in the latest 1.x version of the PHP SDK, that isn’t in this version. I’m hoping it’s just something I may be doing wrong; well, kinda. That’s what I’m asking. I find it somewhat strange that the newest SDK is absent of this.

Here’s what I used to see with the prior version:

Hey Erutan409,

The libcouchbase version was an oversight which should be added in a future version. The json,fastlz,zlib,igbinary support is all runtime based rather than compiled, meaning that the support or lack thereof for them is dependant solely on those extensions being enabled, rather than having compiled support within the SDK. Finally, the directive’s are now all configured at a per-connection level rather than at an installation level, as these should all be configured for each use case (per-application) rather than being global to each installation.

Ninja Edit: Note that the previous couchbase.instance.persistent directive is now always implicitly on due to a restructuring of how the SDK internally handles the connections.

Cheers, Brett


I must apologize. I MUST be missing where all of this new functionality is being documented. Can you link me directly to where all of this is now runtime configurable versus compiled? I haven’t come across any documentation that alludes to where/how this configuration is set.

Side note: is it normal that my execution time has now increased approximately 800 ms when I create a connection to a bucket with a password applied to it?

Thank you for all your responses in this regard!


It’s when I’m performing an insert/upsert that my execution time is bloated to 800+ ms.


I’ve been waiting for documentation on this for some time. I just recently updated my PHP & C SDK to the latest version. Along with upgrading Couchbase to 3.0.2 (Windows 64-bit).

I’m still having issues where querying data from the server is taking over a second for pulling a tiny JSON object from one index. Is this a known issue? Does this have anything to do with not configuring the aforementioned run-time configuration properly?

Here is my environment:

Windows - Everything

  • Couchbase Server 3.0.2 - 64-bit
  • Apache 2.4.10 - (Visual C++ 2012) 32-bit (PHP ran as module)
  • PHP Version 5.5.18 (Visual C++ 2012) 32-bit
  • PHP SDK 2.0.3 - (Visual C++ 2012) 32-bit
  • C SDK 2.4.5 - (Visual C++ 2012) 32-bit

When I create a connection to the server or create a connection to a bucket and/or pull info on said bucket using openBucket::info(), response times are where I would expect them to be; they don’t even show any additional overhead on page load. It’s when I try to either run a get or an upsert (for example) on the aforementioned bucket object that the response time then increases to 1+ seconds. Sometimes, even 2+ seconds!

$cb = new CouchbaseCluster(""); // this works instantly
$bucket = $cb->openBucket("session"); // this still works instantly
var_dump($bucket->info()); // even this pulls info instantly
$bucket->get("something")->value // THIS kills the response time on my app

Any help with this would be great!

Thank you,

Hey Erutan,
There is some notable costs associated with connecting to a cluster which you would not necessarily see during the initial connect, but only on performing an operation, however having 1+ seconds of delay seems quite high, especially on a cluster running locally. Are you sure that you your hardware is capable of running everything you have it properly, also you may want to try using the cbc tool packaged with libcouchbase to get the key and see what kind of times you see.

Cheers, Brett

I’m quite sure my specs are within range for effectively running a local development instance of Couchbase server:

  • i5 @ 2.5 GHz
  • 16 GB RAM (8 GB allocated to Couchbase)
  • Windows 7 Pro 64-bit

I ran the test on the same bucket as I outlined in my previous post:

REM this returns the key value instantly
cbc something -U couchbase://localhost/session

{"LegoMovie":"Everything is awesome!"}

Something strange is going on with the latest PHP library. I never had this issue with the previous version of Couchbase and PHP libraries that were used on 2.x. Again, all Windows environment.


Also, I get the same results with the instance installed on the VM in our server cluster. It’s not just my machine.

Another update:

I just reverted my PHP library back to 1.1.5 and my gets are WAY faster. It doesn’t even register a performance loss, at all.

I hope that helps with diagnosing the issue with the most recent PHP libraries.

After updating my PHP drivers to 2.0.4, I seemed to have resolved my latency issues I was encountering when performing simple get’s from my local and remote instances of Couchbase.

Thanks for the updated drivers!!

@Erutan409 can you please provide the links from where you downloaded all the php, php sdk , c etc … packages?
it has been 5 day trying to make sdk php working with no luck.
Fatal error: Class ‘CouchbaseCluster’ not found in C:\xampp\htdocs\wiss\testwiss.php on line 4

Why it is so difficult to make SDK php working for windows frowning (impossible in my case) ?
I donwloaded all DLL from here:
Installed xampp with php 5.5 32 bit on my windows 7 (64bit) , I have tried this call;

<?php // Connect to Couchbase Server $cluster = new CouchbaseCluster(''); $bucket = $cluster->openBucket('beer-sample'); // Retrieve a document $result = $bucket->get('aass_brewery-juleol'); $doc = $result->value; echo $doc->name . ', ABV: ' . $doc->abv . "\n"; // Store a document $doc->comment = 'Random beer from Norway'; $result = $bucket->replace('aass_brewery-juleol', $doc); var_dump($result); ?>

Assuming you have the thread safe version of PHP 5.5 32bit, you can download the 2.0.4 library from here:

Which is found on this page:

1 Like