CouchbaseViewQuery::from giving error CouchbaseNative:1186


I am getting an error when trying to query a view.

Full error:
Fatal error: Uncaught exception ‘CouchbaseException’ with message ‘method_not_allowed: Only GET,POST,HEAD allowed’ in CouchbaseNative:1186 Stack trace: #0 CouchbaseNative(1240): CouchbaseBucket->_view(Object(_CouchbaseDefaultViewQuery)) #1 /stats.php(15): CouchbaseBucket->query(Object(_CouchbaseDefaultViewQuery)) #2 {main} thrown in CouchbaseNative on line 1186

$cb = new CouchbaseCluster(‘couchbase://’.CB_HOST);
$bck = $cb->openBucket(‘campaigns’, CB_PASS);
$qry = CouchbaseViewQuery::from(‘campaigns’,‘stats’);
$campaigns = $bck->query($qry);

Server setup:
Couchbase 3.0.1
SDK 2.0.0

Anybody any idea how to solve this?


Hey Arthur,

This is a known issue and we are currently investigating, I will let you know as soon as we have something!
You can track progress here:

Cheers, Brett

New version released! I have a few confirmations that it fixes the known issues you were encountering.
Read more here:

Cheers, Brett

Hello, brett,

thanks for the update on the new release.

I have built my own version for php 5.5. It seems to work fine. But I need to build a PHP 5.4.3 version. however, I’m having difficulties compiling it on my own. So I headed to the pre-compiled binaries for 5.4 versions.

But I realised that the binaries link at are broken for 2.0.2

I get this error
403 Forbidden

Code: AccessDenied
Message: Access Denied
RequestId: 42EB48835921FA10
HostId: gplAtZW3OuUIihicBylDkfHp7l2ig3JaZK73WocJ83YcMh4/zM4YRSnr3mKsC9QZBs/pbgVEDWU=

Hey danielphua,

This should be sorted now! Thanks for mentioning it.

Cheers, Brett