To verify you have correctly set up the PHP SDK and the underlying C SDK follow these steps:
Create a new file named test.php and place the following test code it:
<?php $cb = new Couchbase("127.0.0.1:8091", "username", "password", "default"); $cb->set("a", 101); var_dump($cb->get("a")); ?>
Start your Couchbase Server. Note the ip address and port for Couchbase Server and any username and password.
If you need to, update the IP address, username and password
test.php with your Couchbase Server
Save the new script as test.php.
Run your test script:
shell> php test.php
Couchbase Server returns 101.
Now you are ready to ready to develop with the PHP SDK and Couchbase Server 2.0. For more information about methods available in this SDK, see Couchbase Client Library: PHP 1.1. For learning more in general about developing application on Couchbase Server, see Couchbase Developer's Guide 2.0.