500 Error - Call to Undefined function json_encode()

Cooper

Active member
Started to get a HTTP500 error on my forum today, can't access the forum at all. Lots of these errors below in apache log. Any ideas on how to sort?

[error] [client 86.150.187.149] PHP Fatal error: Call to undefined function json_encode() in /var/www/vhosts/mydomain.com/httpdocs/forum/library/XenForo/ViewRenderer/Json.php on line 179
TIA :)
 

Chris D

XenForo developer
Staff member
Can you access the admin CP?

First of all, disable ALL add ons.

Then enable them all one by one. I'd expect it to be one of those that's causing the problem.
 

Jake Bunce

XenForo moderator
Staff member
That function is built-in to PHP. If it's missing then you need to look at your PHP configuration.

http://us.php.net/manual/en/function.json-encode.php

Contact your host or server person. If you manage your own server then make sure PHP wasn't compiled with --disable-json. And make sure json_encode isn't in the disable_functions list in your PHP settings.
 
Top