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
4 Connection Operations
Chapter Sections
Chapters

4.3. Getting Version Information

To obtain an array containing the version number of each of the servers, use the getVersion() function:

API Call$object->getVersion()
Asynchronousno
Description Returns the versions of all servers in the server pool
Returnsarray; supported values:
 arrayArray of the version number for each memcached server in cluster 
Arguments 
 None  

Returns an array containing the version number of each of the memcached servers in the cluster. Please note that this is not the version number of the cluster.

To get the version number for the nodes in the cluster you may do:

$cb = new Couchbase("localhost", 
                    "Administrator", 
                    "secret");
$info = json_decode($cb->getInfo());
foreach ($info->{"nodes"} as $node) {
   print $node->{"hostname"} . " is running " . $node->{"version"} . "\n";
}

To obtain the version information for the client library, use the getClientVersion() method:

API Call$object->getClientVersion()
Asynchronousno
Description Returns the version of the client library
Returnsscalar ( Binary object )
Arguments 
 None