I’m trying to install the php-ext-couchbase with Centos 6.4 64bit. I followed all the instruction including trying the pecl install option. I have googled every possibility and I’m still getting this error.
php -m | grep couchbase
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/couchbase.so' - /usr/lib64/php/modules/couchbase.so: undefined symbol: php_json_encode in Unknown on line 0
Is it because I’m installing it on 6.4 64 bit since I haven’t find any comment from anyone who has successfully done it in Centos 6.4. Please help?
I guess I’m going to try to answer my own question after hours of trial and error. The steps I took doesn’t make any sense at all but somehow it works so I’m not going to spend time trying to figure out why. I have replicated these steps in 2 different servers and they both works after these steps…
Just to clarify, in non-recent versions of PHP, the interpreter was not able to automatically determine extension inter-dependancy, meaning that it was left to the user. In our case, Couchbase is dependant on the JSON extension, and thus it is unfortunately necessary to enforce the couchbase extension loading after the JSON extension, rather than being arbitrarily located in the load order.
Note that using the SDK with newer versions of the PHP interpreter solves this problem, as does using the 2.0 SDK on any PHP version, as we now make dynamic use of the JSON extension.