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
path.
Open the 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 iniThe output provided will have the path to the configuration for PHP, for instance:
Loaded Configuration File => /private/etc/php.ini
Open the php.ini file and add the path to
the couchbase.so file:
extension=/path/to/couchbase.soNow you are ready to verify your install by creating a small sample script using the PHP SDK.