I tried using the latest version of libcouchbase (also shown below); there were no more startup warnings, but the extension was just not showing up in the modules list. Next, I switched to using the precompiled binary from the current version. Again, no PHP startup warnings, but the extension was just not showing up. So, I poked around and found this combination that works on both OS X 10.7 and OS X 10.8.

We simply need to install the latest version of libcouchbase and then compile the Coucbase PHP extension ourselves.

First off, do not do:

1

brew install libcouchbase

This will installs the wrong version and you’ll see an error like this when you get to the ./configure step.

1

2

3

4

5

6

configure:error:

It appears you are using libcouchbase1.x

ThisDP version of the php extension supports libcouchbase-2.0.0beta

orhigher.Either useastable1.0version of the php extension,

upgrade your libcouchbase,orspecify the location ofa

libcouchbase-2.0.0installation with--with-couchbase

Instead, install the latest version of libcouchbase, and get the couchbase php extension source code and compile it:

Then, register the couchbase extension by adding the following to your php.in. Mine is /etc/php.ini.

1

extension=couchbase.so

Now, you can confirm that PHP is loading this new extension by doing:

1

php-m

You should see couchbase in the list of modules. If you see it there, everything has gone according to plan. If it doesn’t show up and you see no startup warnings, you can try specifying the extensions path explicitly.

1

extension=/path/to/couchbase.so

Lastly, restart Apache

1

sudo apachectl restart

and double check that the couchbase module is being shown when you do a phpinfo();