You are not logged in.

#1 2009-11-27 01:32:39

leonardof
Member
Registered: 2008-09-05
Posts: 66

[solved] PHP Fatal error: Call to undefined function json_encode()

I have PHP 5.3 installed, it was supposed to have support for JSON. But I am running the Weave minimal server and I get this error from apache's error log:

[Thu Nov 26 23:11:46 2009] [error] [client 127.0.0.1] PHP Fatal error:  Call to undefined function json_encode() in /srv/http/weave/index.php on line 58

How do I get this PHP code working?

Last edited by leonardof (2009-11-27 18:58:19)

Offline

#2 2009-11-27 12:23:37

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: [solved] PHP Fatal error: Call to undefined function json_encode()

Uncomment any additional modules required by the application in /etc/php/php.ini. In this case, you'd need to uncomment the 'extension=json.so' line.

Last edited by foutrelis (2009-11-27 12:30:25)

Offline

#3 2009-11-27 18:58:00

leonardof
Member
Registered: 2008-09-05
Posts: 66

Re: [solved] PHP Fatal error: Call to undefined function json_encode()

Thank you, it solved the issue. In fact, I still get another error, but I'd rather open a new thread (with a new title) for it.

Offline

Board footer

Powered by FluxBB