Help Couchbase+php osx

I have installed couchbase server Version 3.0.2-1603-rel on mac osx. Choosed beer-sample to start. Founded test tutorial for php:

$cluster = new CouchbaseCluster('http://127.0.0.1:8091');
$bucket = $cluster->openBucket('beer-sample');
var_dump($bucket);

and I am getting error at line $bucket = $cluster->openBucket(‘beer-sample’);

Fatal error: Uncaught exception 'CouchbaseException' with message 'Data received on socket was not in the expected format' in [CouchbaseNative]/CouchbaseBucket.class.php:74 Stack trace: #0 [CouchbaseNative]/CouchbaseBucket.class.php(74): _CouchbaseBucket->__construct('http://127.0.0....', 'beer-sample', '') #1 [CouchbaseNative]/CouchbaseCluster.class.php(61): CouchbaseBucket->__construct('http://127.0.0....', 'beer-sample', '') #2 /Library/WebServer/Documents/test/one.php(6): CouchbaseCluster->openBucket('beer-sample') #3 {main} thrown in [CouchbaseNative]/CouchbaseBucket.class.php on line 74

I have PHP Version 5.5.14 and couchbase php driver Version 2.0.5. What is the problem?

I have just found out that beer-sample doesnt work because of its type. Bucket Type: Couchbase.
if I create my test bucket with bucket type - Memcached. There is no error. Tell me please why is Bucket Type: Couchbase throws me an exception written above?

Please help me somebody. Did not get any answer yet.

Hey tak1berry,

It appears that your Couchbase Server installation may be corrupted. Would you be able to provide any further detail on your Couchbase Server version and environemnt? Additionally, could you try using new CouchbaseCluster('couchbase://127.0.0.1')?

Cheers, Brett

$cluster = new CouchbaseCluster('couchbase://127.0.0.1');
$db = $cluster->openBucket('default');

Didnt help me. Still getting errors

Fatal error: Uncaught exception 'CouchbaseException' with message 'Data received on socket was not in the expected format' in [CouchbaseNative]/CouchbaseBucket.class.php:74 Stack trace: #0 [CouchbaseNative]/CouchbaseBucket.class.php(74): _CouchbaseBucket->__construct('couchbase://127...', 'default', '') #1 [CouchbaseNative]/CouchbaseCluster.class.php(61): CouchbaseBucket->__construct('couchbase://127...', 'default', '') #2 /Library/WebServer/Documents/test/one.php(7): CouchbaseCluster->openBucket('default') #3 {main} thrown in [CouchbaseNative]/CouchbaseBucket.class.php on line 74

I use couchbase under osx yosemite 10.10.2
couchbase server Version 3.0.2-1603-rel
PHP Version 5.5.14
couchbase php driver Version 2.0.5

Installation passed normal for me, in mac couchbase server has gui and it contains a ‘default’ cluster.
May be there is a problem because of osx 10.10.2. Couchbase requires elder version?

Hey tak1berry,

I personally test the PHP SDK on my OSX Yosemite Mac, with Couchbase Server 3.0.2 running locally and PHP 5.5.14. And have not ever encountered an issue as you have mentioned. This looks like a firewall or other installed software on your system is interfering with the network connections made to the server.

Cheers, Brett