Call to undefined function json_encode()

A place for users and developers of the Xataface to discuss and receive support.

Call to undefined function json_encode()

Postby dha » Fri Nov 19, 2010 1:24 pm

Hi Steve,

I have the app working on my PC but when I deployed it onto the lamp server, I got this error log message:
[error] [client x.x.x.15] PHP Fatal error: Call to undefined function json_encode() in /home/alst/public_html/dataface/Dataface/Record.php on line 2674, referer: http://alst.mysite.com/alst_app/index.p ... cursor=0...

Could you help by pointing out what I missed? Truly appreciated.

Don
dha
 
Posts: 5
Joined: Wed Oct 20, 2010 8:52 pm

Re: Call to undefined function json_encode()

Postby goxatago » Fri Nov 19, 2010 3:01 pm

Perhaps the json lib is not installed ?

Try this
http://slaptijack.com/system-administra ... for-php-5/
goxatago
 
Posts: 14
Joined: Fri Jul 09, 2010 2:08 am

Re: Call to undefined function json_encode()

Postby shannah » Mon Nov 22, 2010 11:06 am

Yes. Apparently json is only available with PHP 5.2 or higher. I'll be adding workarounds for this in the next version. To work around this you basically just need to define the json_encode and json_decode functions. Xataface is distributed with a PEAR class Services_JSON which implements these as methods... they just need to be wrapped in functions named json_encode and json_decode
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 16 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved