Search:

Search all manuals
Search this manual
Manual
Couchbase Client Library: PHP 1.0
Community Wiki and Resources
Wiki: PHP Client Library
PHP Client Library
SDK Forum
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
1.1 Downloading and Installation
Chapter Sections
Chapters

1.1.1. Verify the SDK Install

To verify you have set up the PHP SDK correctly follow these steps:

  1. Create a new file named test.php andplace the following test code it:

    <?php
        $cb = new Couchbase("127.0.0.1:8091", "username", "password", "default");
        $cb->set("a", 1);
        var_dump($cb->get("a"));
    ?>
  2. Save the new script as test.php.

  3. Start your Couchbase Server. Note the ip address and port for Couchbase Server and any username and password.

  4. If needed, update the IP address, username and password in test.php with your Couchbase Server information.

  5. Run your test script:

    shell> php test.php

    Couchbase Server returns 1.