Search:

Search all manuals
Search this manual
Manual
Couchbase Client Library: PHP 1.1
Community Wiki and Resources
Wiki: PHP Client Library
PHP Client Library
Couchbase Developer Guide 2.0
Couchbase Server Manual 2.0
SDK Forum
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
1 Getting Started
Chapter Sections
Chapters

1.1. Downloading and Installation

1.1.1. Verifying the PHP SDK

Follow these steps to install and set up the PHP SDK:

  1. Get, Install and Start Couchbase Server. Come back when you are done.

  2. Get and install the C Library. The C SDK is a requirement for the PHP library.

  3. Download the PHP SDK for your system at Develop with Couchbase.

  4. 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.

  5. 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 ini

    The output provided will have the path to the configuration for PHP, for instance:

    Loaded Configuration File => /private/etc/php.ini
  6. Open the php.ini file and add the path to the couchbase.so file:

    extension=/path/to/couchbase.so

Now you are ready to verify your install by creating a small sample script using the PHP SDK.