Ideally it is recommended you install everything from the binary releases featured at
| PHP Client
||Libcouchbase||Stable|| Server Compatibility
|| Supported Features
|master branch|| 2.0.0beta2 (or current
|Volatile||2.0, 1.8|| Same as 1.1.x, maybe some
|1.0.x branch||1.0.x||Yes (mostly)||2.0, 1.8||Same as 1.0.x release|
The 1.0.x PHP Couchbase Client Library does not currently use multiple URIs, but this can be easily worked around when setting up the connection. A future release will add support for multiple URIs.
It is a common need to install from source (there is a lot of variation in the Zend API revisions)
The first thing to do is install libcouchbase, the C client library for Couchbase, including development files.
It is not required to build both libcouchbase and the php extension from source. As long as you have the matching version of libcouchbase installed (and its development headers, i.e. libcouchbase-dev or libcouchbase-devel) it is possible to compile and build the PHP extension.
Use the above version matrix to determine the version you need.
For php-ext-couchbase source installation, do the following:
If libcouchbase is installed in a non-default path (for example, in your home directory) then you need to specify --with-couchbase=$dir to ./configure, where $dir is the installation prefix; such that $dir/include/libcouchbase/couchbase.h exists, and that $dir/lib/libcouchbase.so (or libcouchbase.dylib, for OS X) exists
The 1.0.x PHP extension version is available in source form from the 1.0.x branch on github. This version is not recommended for current development, but is still available for existing applications which rely on it. Upgrading from 1.0.x to the current version requires very few, if any, code changes to the application.
As outlined in the Version Matrix, the 1.0.x PHP extension needs the 1.x libcouchbase library. It will not work with libcouchbase 2.0.x. Binary packages for these older releases are available:
After cloning the php-ext-couchbase repository from github, the 1.0.x branch can be checked out with:
$ git checkout 1.0.x
Follow the instructions for building from source as usual.