Is json support available for PHP in Red Hat Enterprise Linux 5?
Issue
The following information has been provided by Red Hat, but is outside the scope of the posted Service Level Agreements and support procedures. The information is provided as-is and any configuration settings or installed applications made from the information in this article could make the Operating System unsupported by Red Hat Global Support Services. The intent of this article is to provide information to accomplish the system's needs. Use of the information in this article at the user's own risk.
Issue
- How to get json support for RHEL 5?
Environment
- Red Hat Enterprise Linux 5
Resolution
There is no json package shipped with RHEL 5.
Install php-pear, php-devel and gcc packages using yum as follows.
# yum install php-devel php-pear gcc
# pecl install json
Add the following entry in /etc/php.ini
extension=json.so
OR
Create a file in /etc/php.d called “json.ini”, and add the following line:
extension=json.so
This will install json module from php.net and need to restart apache server for the changes to take effect.
# service httpd restart
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.