Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A PHP extension wrapping libcouchbase
C PHP Perl C++

This branch is 114 commits ahead, 2 commits behind couchbaselabs:master

Correct issue causing SDK 2.0 compatability to fail.

Change-Id: I2ca630f5d1a1db1c019f7bac318002e8688d86af
Reviewed-by: Brett Lawson <>
Tested-by: Brett Lawson <>
latest commit 4ab3fa0f48
Brett Lawson brett19 authored
Failed to load latest commit information.
example Correct documentation error for getReplica.
fastlz Bundle fastlz
management PCBC-256: Added missing connect call for lcb management instances.
package Add bucket manipulation example
tests PCBC-219 bugfix
tools Fixup whitespace
.gitignore PCBC-79 Allow to specify licouchbase location for tarballs Add information on how to contribute to the driver
LICENSE Add package build script. PCBC-33: Add support for igbinary
TESTING.pod Add testing howto
apidecl.h Add missing license headers
arithmetic.c PCBC-251: Add missing prefix for incr/decr/unlock
ccache.c Add missing license headers
compress.c Add missing license headers
config.m4 Updated support for getReplica
config.w32 Updated support for getReplica
convert.c PCBC-219 bugfix
couchbase.c Remove bogus {{{ }}}
couchbase.php Initial commit, finish ext skeleton.
create.c Corrected segfault when using unwriteable cache directory.
designdoc.c Add missing license headers
error.c Add missing license headers
exceptions.c Add missing license headers
exceptions.h Add missing license headers
flush.c PCBC-241: Fix compile warnings
get.c PCBC-241: Fix compile warnings
ht.c Add missing license headers
ht.h Add missing license headers
internal.h Correct issue causing SDK 2.0 compatability to fail.
misc.c Add missing license headers
observe.c Fixup observe test failure
options.c Add missing license headers
package.xml Release 1.2.2
php_couchbase.h Next version should be 1.2.0
remove.c PCBC-251: Add missing prefix for incr/decr/unlock
replica.c Change too generic function name
resget.h Add missing license headers
resmgr.c Add missing license headers
simple_observe.c PCBC-241: Fix compile warnings
simple_observe.h Add missing license headers
stat.c Remove bogus {{{ }}}
store.c Revert "Revert "PCBC-227: Allow store of pure numeric keys""
timeout.c Add missing license headers
touch.c PCBC-241: Fix compile warnings
unlock.c PCBC-251: Add missing prefix for incr/decr/unlock
version.c Add missing license headers
viewopts.c Add missing license headers
views.c PCBC-226 Use HTTP POST if "keys" are specified
views.h Add missing license headers


A PHP extension wrapping libcouchbase.


libcouchbase igbinary (optional)


End users should install the module by executing:

$ pecl install couchbase

Developers who want to build the latest bits from the source repository may execute the following steps

$ phpize
$ ./configure
$ make
$ make test

Running make test assumes that you have a Couchbase server listening on port

If you are using a webserver installation of PHP, you might need to restart your webserver.

If you have igbinary installed, make test will most likely fail with an error message reporing a missing symbol. Don't worry; it has an explanation. During make test php generates another php.ini file for us which don't include the igbinary module. To work around this all you need to do is to edit the Makefile and add the following as the first parameter parameter to run-tests.php:

-d extension=/absolute/path/to/

First Step

Create a new script test.php:

$cb = new Couchbase("", "Administrator",
                    "password", "default");
$cb->set("a", 1);
$a = $cb->get("a");
echo $a;


PHP 5.3 or later.

Windows support is coming in the next release.


Apache License 2.0


See CREDITS file. Thanks all!


(c) 2011, 2012, 2013 Couchbase


If you'd like to contribute to the project, please look in

Something went wrong with that request. Please try again.