Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

Couchbase OO PHP SDK: How to detect connection failure?

No replies
  • Login or register to post comments
Thu, 07/05/2012 - 18:38
coding_in_the_f...
Offline
Joined: 07/05/2012
Groups: None

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.

Top
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker