Fatal error Call to undefined function json_encode()

After upgrade to Ubuntu 13.10 , I couldn’t run my website any more. I checked on /var/log/nginx/error.log . It show Fatal error: Call to undefined function json_encode() . In phpinfo() , my php version is 5.5.3. Look like they didn’t supprot json_encode or json_decode() any more. I found Bye Bye non free php json extension.

I found the solution on stackoverflow for Ubuntu 13.10.

apt-get install php5-json

After that , need to update in php.ini.

extension=json.so

After that , need to restart your php5-fpm or your apache.

comments powered byDisqus