Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
37
rated 0 times [  37] [ 0]  / answers: 1 / hits: 20789  / 2 Years ago, fri, june 3, 2022, 8:50:21

Just updated to saucy 13.10 and json_encode is missing from the bundled php. json doesn't appear in the phpinfo() output and i'm getting this error in my app:



PHP Fatal error:  Call to undefined function json_encode()


Anyone else experiencing this or know the fix?


More From » php

 Answers
1

Install php5-json:



sudo apt-get install php5-json


This used to be provided by php5-common but that has changed in Saucy. No idea why and seems like a silly thing to do but it's very simple to fix.



After the installation, make sure to also restart the Apache2 server:



sudo service apache2 restart

[#28925] Sunday, June 5, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
edseager

Total Points: 185
Total Questions: 105
Total Answers: 102

Location: Angola
Member since Wed, Apr 13, 2022
2 Years ago
;