Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing PHP SDK Couchbase error

Tags:

I'm trying to install the PHP SDK for my Couchbase cluster and everything during installation finishes without a hitch, but when I run php -i in the terminal I get the following error:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/couchbase.so' - /usr/lib/php5/20121212/couchbase.so: undefined symbol: php_json_decode_ex in Unknown on line 0

I don't understand why the couchbase extension won't load.

My setup is:

Ubuntu Server 14.04 Couchbase Server Enterprise 4.5.1

I followed this guide for setting up PHP SDK:

Link to PHP SDK installation guide

like image 292
Peter Karlsson Avatar asked Nov 18 '16 13:11

Peter Karlsson


1 Answers

Enable extension=json.so in your php.ini if it is not enabled. If it is, enable the couchbase extension after the json extension.

As said in the couchbase php sdk documentation

The Couchbase SDK depends on the JSON PHP extension, so make sure that load order is correct. For example, if your distribution has just a single php.ini file, just insert the line after extension=json.so. If your distribution uses a conf.d-style, name the file with the Couchbase SDK ini so that it will be alphabetically ordered after the JSON extension.

like image 81
Lucas Meine Avatar answered Oct 11 '22 13:10

Lucas Meine