Call to undefined function json_decode()

My

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/domain.net/www/index.php on line 36" while reading response header from upstream, client: 84.91.4.220, server: domain.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.domain.net"

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 *

This site uses Akismet to reduce spam. Learn how your comment data is processed.