Fatal error: Uncaught Error: Class 'CouchbaseCluster' not found in /var/www/html/aula8/resource_controller.php:27
Stack trace:
#0 /var/www/html/aula8/resource_controller.php(22): ResourceController->search(Object(Request))
#1 /var/www/html/aula8/request_controller.php(37): ResourceController->treat_request(Object(Request))
#2 /var/www/html/aula8/index.php(6): RequestController->execute()
#3 {main}
thrown in /var/www/html/aula8/resource_controller.php on line 27
Its not recognizing the CouchbaseCluster Class. I installed everything right. I dont understand. Do i have to include something?
When i do this: $cluster = new CouchbaseCluster('127.0.0.1:8091', 'root', '123456'); $bucket = $cluster->openBucket('teste', 'teste'); $res = $bucket->get('2');
It works fine.
When i do this: $cluster = new CouchbaseCluster('127.0.0.1:8091', 'root', '123456'); $bucket = $cluster->openBucket('teste', 'teste'); $query = CouchbaseN1qlQuery::fromString('SELECT * FROM teste'); $rows = $bucket->query($query);
It dosent work and replies this: Uncaught CouchbaseException: LCB_HTTP_ERROR: HTTP Operation failed. Inspect status code for details in [CouchbaseNative]/CouchbaseBucket.class.php:316 Stack trace: #0 [CouchbaseNative]/CouchbaseBucket.class.php(316): _CouchbaseBucket->n1ql_request('{"statement":"S...', true) #1 [CouchbaseNative]/CouchbaseBucket.class.php(378): CouchbaseBucket->_n1ql(Object(CouchbaseN1qlQuery), false) #2 /var/www/html/aula8/resource_controller.php(34): CouchbaseBucket->query(Object(CouchbaseN1qlQuery))