I’m writing a bit of PHP that requires the use of the json_encode function. This function is built into php > 5.2 and on Fedora 10, it’s not an issue.
PHP 5 >= 5.2.0, PECL json >= 1.2.0
Unfortunately Cent OS 5.3 uses php 5.1.6. No worries, using pecl it’s relatively straight forward .
You want to make sure you have pear and php-devel installed. Pear will provide you with the pecl executable and php-devel provides the executable phpize, both of which are needed to build the json module.
Run the following as root.
# yum install php-pear php-devel
# pecl install json
One more thing… You’ll either need to reconfigure SELinux or disable it.
That should be it.