Fixing PHP in Ubuntu 13.10
If you are running Ubuntu, and you upgrade your server (or most likely your dev machine) to Ubuntu 13.10, you may run into the following error:
PHP message: PHP Fatal error: Call to undefined function json_encode() in /my/file/index.php
It took me a minute to figure this out but evidently due to a licensing issue some >= PHP 5.5rc2 distros have removed the JSON extension. So you'll need to install a package yourself:
sudo apt-get install php5-json
Note that you may need to restart php, or php5-fpm if you are using nginx. :)
Written by Patrick Coffey
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#