Quantcast
Channel: Web – ITechLounge.net
Viewing all articles
Browse latest Browse all 28

Linux : How to add JSON support to CentOS 5 PHP 5.1.6

$
0
0

JSON support come natively with PHP 5.2 and later. If you are running CentOS Linux 5, this is PHP version 5.1.6 that is included by default. Fortunately, since version 5.6, CentOS packaged version 5.3.3 of PHP that can be installed through YUM (not included in the ISO set).

If you still run applications that can’t run on recent version of PHP, there is a workaround to get JSON support to PHP 5.1.

1. Make sure your system/PHP is up2date first :

yum update

If you only want PHP update, do :

yum update “*php*”

2. Install JSON module through Pecl :

pecl install json

3. Create the extension file to make it effective :

/etc/php.d/json.ini

With the following content :

extension=json.so

4. Now, you need to restart Apache to load the extension :

service httpd reload


Viewing all articles
Browse latest Browse all 28

Trending Articles