Sorry, I can’t upload attachments. I’m a new user.
PHP --INI
PHP Warning: Module ‘json’ already loaded in Unknown on line 0
[cb,WARN] (pcbc/ext L:393) igbinary serializer is not found
Configuration File (php.ini) Path: /etc/php/7.1/cli
Loaded Configuration File: /etc/php/7.1/cli/php.ini
Scan for additional .ini files in: /etc/php/7.1/cli/conf.d
Additional .ini files parsed: /etc/php/7.1/cli/conf.d/10-opcache.ini,
/etc/php/7.1/cli/conf.d/10-pdo.ini, /etc/php/7.1/cli/conf.d/15-xml.ini,
/etc/php/7.1/cli/conf.d/20-calendar.ini, /etc/php/7.1/cli/conf.d/20-ctype.ini,
/etc/php/7.1/cli/conf.d/20-dom.ini, /etc/php/7.1/cli/conf.d/20-exif.ini,
/etc/php/7.1/cli/conf.d/20-fileinfo.ini, /etc/php/7.1/cli/conf.d/20-ftp.ini,
/etc/php/7.1/cli/conf.d/20-gettext.ini, /etc/php/7.1/cli/conf.d/20-iconv.ini,
/etc/php/7.1/cli/conf.d/20-json.ini, /etc/php/7.1/cli/conf.d/20-phar.ini,
/etc/php/7.1/cli/conf.d/20-posix.ini, /etc/php/7.1/cli/conf.d/20-readline.ini,
/etc/php/7.1/cli/conf.d/20-shmop.ini, /etc/php/7.1/cli/conf.d/20-simplexml.ini,
/etc/php/7.1/cli/conf.d/20-sockets.ini, /etc/php/7.1/cli/conf.d/20-sysvmsg.ini,
/etc/php/7.1/cli/conf.d/20-sysvsem.ini, /etc/php/7.1/cli/conf.d/20-sysvshm.ini,
/etc/php/7.1/cli/conf.d/20-tokenizer.ini, /etc/php/7.1/cli/conf.d/20-wddx.ini,
/etc/php/7.1/cli/conf.d/20-xmlreader.ini, /etc/php/7.1/cli/conf.d/20-xmlwriter.ini,
/etc/php/7.1/cli/conf.d/20-xsl.ini
ERROR
Fatal error: Uncaught Error: Class ‘CouchbaseCluster’ not found in /var/www/html/index.php:8 Stack trace: #0 {main} thrown in /var/www/html/index.php on line 8
<?php
$bucketName = "default";
// Connect to Couchbase Server
$cluster = new CouchbaseCluster("couchbase://127.0.0.1");
$bucket = $cluster->openBucket($bucketName);
Is the same script as the script on web page.
For background, I’m running on Ubuntu 16.04 with PHP 7.0 right now.
I’m receiving a bit of the same error here; I no longer got the missing cluster class error but it still wouldn’t work correctly.
What I get when I try a simple cluster instance attempt is:
[cb,WARN] (pcbc/ext L:393) igbinary serializer is not found
Looks like in the install instructions, a user might have to do a
sudo pecl install igbinary
before
sudo pecl install couchbase
Just in case it helps to see the particular versions I’m using, my pecl list produces the following output:
Installed packages, channel pecl.php.net:
=========================================
Package Version State
couchbase 2.3.0 stable
igbinary 2.0.1 stable
pcs 1.3.3 beta
Everything appears to be working correctly when using Couchbase 5.0 preview so far, though I haven’t gotten around to data retrieval from the DB itself.
I created a simple PHP file that just created a CouchbaseCluster object and then print_r() what was returned. The problem is that the return value was empty as the only displayed information was that igbinary warning.
I installed igbinary and PHP told me I had to reinstall couchbase. Long story short, I had to remove couchbase via pecl, then I reinstalled 2.3.0. I figured it could help others save a little time. It was early this morning and my memory is a bit foggy, but I think it told me I had to rebuild couchbase. Being lazy, I use a browser to see phpinfo(). Before I manually added in igbinary, the line in couchbase for igbinary decoder was saying it was disabled. Now, after all this, it’s saying enabled.
Once I solved my igbinary warning, the returned value for the cluster object could be worked with.
Things are working well. Almost normal (being away from my Mac, my workflow suffers greatly).