Call to undefined function json_decode()


tail -f /var/log/nginx/error.log

was getting me  the following error

2013/11/19 20:07:59 [error] 5561#0: *192 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_decode() in /home/webroot/ on line 36" while reading response header from upstream, client:, server:, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: ""

Simple solution

sudo apt-get install php5-json

and then restart php5-fpm

sudo service php5-fpm restart

Leave a Reply

Your email address will not be published. Required fields are marked *