PHP client under ubuntu 12.04 or 12.10

I wonder how do I install the client library for PHP on ubuntu 12.04 or 12.10?
I can only find packages/sources for older versions of ubuntu.
Any help is apreciated.

Mr. Couchpotatoe

Chances are the Ubuntu 11 extension will work fine on Ubuntu 12, but at the moment Ubuntu 12 is not part of our test coverage for release and we do not build there.

At the moment, I’m struggling to get the Oneiric version to work in 12.04. I haven’t been able to source/make/compile a version here either. I can install Couchbase just fine, but the PHP extension fails.

How does it fail? We’ll help get things worked out.

I successfully built libcouchbase and php-ext-couchbase from source on Ubuntu 12.10.
Remember not to delete the default bucket before running “make test” or the tests will fail.
Edit your /etc/php5/apache2/php.ini and your /etc/php5/cli/php.ini to include e.g : “extension=/usr/lib/php5/20100525/”


It would be really nice if there were pre-built version of the PHP extension for Ubuntu 12.04. Ubuntu 12.04 is an LTS release and my dedicated server provider does not even provide Ubuntu 11.10 any more.

I have been using the 11.10 build on my Ubuntu 12.10 with no problem

What version of php do you have on your ubuntu 12.04 or 12.10 server ?

I’m using the PHP version from the Ubuntu 12.10 repo:
PHP 5.4.6-1ubuntu1.1

Didn’t try to compile it. I’ll just wait till Couchbase’s clients are fixed or whatever.

Hi Me,

(that sounds odd)

To our knowledge, you shouldn’t need to compile but that depends a bit on PHP compatibility. What is it that fails?


Actually current Couchbase PHP SDK precompiled package for Ubuntu 11.10 is not compatible with PHP 5.4 (different API). And it cannot be compatible, because PHP package in Ubuntu 11.10 was for version 5.3.6, not 5.4.
It’s not difficult to compile SDK from sources, but it’s just less convenient.

debian squeezy, PHP 5.4 - SDK doesn’t work from package (old API).
Of course, it’s not a problem to compile from sources, but, you know it’s much more convenient to use just apt-get update.

Exactly, the API version of PHP are different. It would be amazingly convenient if couchbase provided precompiled versions since the manual compilation introduces more manual steps when setting up a new server.

Below is a link to compiled for PHP 5.4.X, i tested it with 5.4.10 it it works both on CentOS as well a Fedora 17. To avoid any issues, copy file into the required PHP ext dir and add “” on new line
after in the json.ini file. that will make sure json is loaded before and there will be no need to edit php.ini.

Hope that helps… for PHP 5.4.X


Thanks for your efforts but our policy prevents me from introducing untrusted binaries on our system which is why I am so eager to get official files.

Thanks anyway!


I just walked through this myself on a pretty much blank 12.10 ubuntu rack space server and it worked well and didn’t take long.

Prior to this I had done:

apt-get install apache2
apt-get install php5

Here were the steps I took:

sudo bash

C Client:

wget -O/etc/apt/sources.list.d/couchbase.list

-O- | sudo apt-key add -
apt-get update
apt-get install libcouchbase2 libcouchbase-dev

PHP Client:

apt-get install php5-dev
apt-get install make
apt-get install unzip
cd ~

cd php-ext-couchbase-master/package
cd …

// here I ran ‘make test’ and it went well (95% success)
// note: you need the server installed and running with default bucket to run 'make test’

cd modules

Now you should see the complete! Copy where needed for you and don’t forget to update php.ini