Reputation: 340
It says "undefined symbol: php_json_encode" but json is installed already? also, when i add json.so to the php.ini, it say that module is already loaded?
Upvotes: 2
Views: 5591
Reputation: 134
Because you add json.so into php.ini and do not remove the php.d/json.ini
Error shows the reason: json.so should be loaded before memcached.so
Please use php -m | grep memcached
to check whether memcached.so is loaded successfully.
memcached
, this means it has succeeded.PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/memcached.so' - /usr/lib64/php/modules/memcached.so: undefined symbol: php_json_decode_ex in Unknown on line 0
Here is the solution: e.g. your php.ini is /etc/php.ini, your php.d is /etc/php.d/
Solution 1
vim /etc/php.d/memcached.ini
extension=memcached.so
in /memcached.iniphp -m | grep memcached
to check whether memcached is successfully loadedSolution 2
rm /etc/php.d/json.ini
extension=json.so
in php.ini before extension=memcached.so
php -m | grep memcached
to check whether memcached is successfully loadedUpvotes: 7