Saturday, January 19, 2013

Installing Couchbase PHP SDK for PHP 5.4 + Couchbase Server 2.0

Precompiled SDK package for PHP is not compatible with PHP 5.4 API. So don't waste your time and compile it from sources. And, of course, forget about apt-get update. Very "enterprise" way, what can I say...

Couchbase Server GUI looks very attractive. Has email alerts and lot of graphics for monitoring.

If in this article you are looking instructions "how to install", then just open pages with instructions:Server:Couchbase Server Manual - InstallationDon't forget to configure server in web-interface.Client:Install PHP SDK for CouchbaseAt the moment of writing this article, precompiled PHP SDK package is not compatible with PHP 5.4, so use sources (link "Source archive."). Before compilation, install packages php5-dev and php-pear. Then download, unzip, go to unzipped folder and run

phpize./configuremakesudo make install

and copy path of generated module from output. You need to add it into php.iniFor php5-fpm it will be:

sudo nano /etc/php5/fpm/conf.d/couchbase.ini

and add line (use generated path + "couchbase.so").

extension=/usr/lib/php5/20100525+lfs/couchbase.so

Now restart php

sudo /etc/init.d/php5-fpm restart

And check it:

php -m | grep couchbase

In output you should see "couchbase". Also, in phpinfo() you will see something like

; Grow your business with a custom-built, interactive mobile site builder. Avoid the stress and hassle of building the mobile website yourself, So, choose it for the platform’s simplicity with affordable pricing . Thank you.....web development