Follow these steps to install and set up the PHP SDK:
Get, Install and Start Couchbase Server. Come back when you are done.
Get and install the C Library. The C SDK is a requirement for the PHP library.
Download the PHP SDK for your system at Develop with Couchbase.
Unpack the archive containing the PHP SDK in the directory of your choice:
shell> tar xzf php-ext-couchbase-$system-$arch.tar.gz
This creates the directory
php-ext-couchbase. This directory
includes a file
couchbase.so which is the
PHP extension for the SDK. Note the path to this file as you
will use it to update the PHP configuration file with this
php.ini file for your PHP
interpreter. This is the initializer for PHP which you will
edit. You can get the path with this command:
shell> php -i | grep ini
The output provided will have the path to the configuration for PHP, for instance:
Loaded Configuration File => /private/etc/php.ini
php.ini file and add the path to
Now you are ready to verify your install by creating a small sample script using the PHP SDK.