1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

500 Error - Call to Undefined function json_encode()

Discussion in 'Troubleshooting and Problems' started by Cooper, May 13, 2012.

  1. Cooper

    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?

    TIA :)
  2. Chris D

    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.
  3. Cooper

    Cooper Active Member

    Looks like it is a PHP extension error. Can't access forum/acp at all.
  4. Jake Bunce

    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.


    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.
  5. Cooper

    Cooper Active Member

    Thanks Jake. Seems someone decided to recompile PHP with several functions disabled! Sorted now.
    Yorick likes this.

Share This Page