dante7 — 2012-07-24T12:47:08-04:00 — #1
Hi! I'm having a problem with this simplified code - json_encode function, to be precise.
$arr = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5);
This script works on my local server without any problem, however when I upload it to my remote server, I get "500 Internal Server Error". What could be the cause of this, any ideas? Maybe some server config?
cpradio — 2012-07-24T13:35:35-04:00 — #2
From php.net (though I don't see anything that should look like a 500 Internal Server Error)
In the event of a failure to encode, json_last_error() can be used to determine the exact nature of the error.
Is is any more code to your file than what you pasted?
Also check what version of PHP your server is running using phpinfo()
starlion — 2012-07-24T13:36:15-04:00 — #3
Version of PHP/PECL json library matters....