Couchbase OO PHP SDK: How to detect connection failure?
Thu, 07/05/2012 - 18:38
Hi,
I am using the PHP OO API and trying to figure out how to detect connection failure? For my test, I shutdown the server and I tried doing this:
$cb = new Couchbase("$host:$port", $user, $pass, $bucket);
if (!$cb) {
echo "Connection Failed";
}
So, even though the server has been shutdown the condition above is not true. Also is there a way to specify connection timeout / what is the default connection timeout?
Any help will be much appreciated.