Hi Nick,

Nice article. I ran into this problem the other day but for a slightly different reason. A lot of web hosts run RHEL 5 or CentOS 5, which include the fairly out-of-date PHP 5.1.6. The function json_decode() was added to PHP in 5.2.0, so if you need to use it in a web app that's hosted on one of these platforms you will run into problems.

Luckily there is still a workaround, you can just add in an external file that defines the function if it's missing. See http://web.archive.org/web/20090429084654/http://forums.mawhorter.net/v…, I tried it and it works a treat on PHP 5.1.6 while still maintaining compatibility with PHP 5.2.0+.

CAPTCHA