Adding JSON Support to PHP on your CentOS LAMP Installation

Before you begin start by making sure you have everything up to date by running
$--> yum update
$--> yum update "*php*"

The first command will update all components to the latest version.  Be careful make sure this won't interfere with anything else you may be running.

The second will update only php related components.  But caution should be taken with this command also if you are running any kind of bespoke application.  Make sure if you update your php components to the latest version/release that your web application will still operate correctly.

Next run
$--> pecl install json

After this command has completed you need to make sure that JSON support is enabled with your Apache/PHP stack starts

To do this, you can either add the following line to the end of  your /etc/php.ini file or what I prefer to do is create a json.ini in the folder /etc/php.d  so run the command
$--> echo “” > /etc/php.d/json.ini

To add this to your php.ini file instead the following command should do
$--> echo “” >> /etc/php.ini

Then restart your apache servcies
$--> service httpd restart


Popular posts from this blog

ActiveMQ, easy to use open source message oriented middleware (MOM)

Basic Send Message to MQ with Java and IBM MQ JMS

Automated Service Monitoring with F5, Consul and Python F5 SDK