ZF-6394: Zend_Json::decode() returns exception when mbstring.func_overload activated
Description
Hi,
I'm translating an application to UTF-8 and I have a problem with the Zend_Json::decode().
I've json strings stored in database and they are decoded correctly on my old non UTF8 apache server.
If I run the same code with the same json string on my utf-8 apache config, I have an exception Fatal error </ b>: Uncaught exception 'Zend_Json_Exception' with message 'Missing "," in object encoding:
I tried to identify the issue and it appears when I activate the option mbstring.func_overload in my httpd.conf.
The json string has been validated by online validators and is correctly parsed by javascript.
Regards
HJ
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2009-04-23T09:34:17.000+0000
Is ext/json enabled on your server? i.e., are you using PHP's native JSON support, or ZF's implementation to decode the JSON string? (Zend_Json::decode() proxies to ext/json if it's enabled). This information will allow me to better track down the issue.
If you are not using ext/json, can you attempt to enable it to see if using it solves the issues?
Posted by Henry Jean (henryjean) on 2009-04-23T10:33:56.000+0000
In phpinfo, i see json enabled (version 1.2.1)
Posted by Henry Jean (henryjean) on 2009-04-23T10:43:20.000+0000
Posted by Henry Jean (henryjean) on 2009-04-24T01:09:29.000+0000
I changed the value of mbstring.func_overload in php config and the problem occurs only with mbstring.func_overload=7. So only if ereg functions are overloaded
Regards
HJ