How to add / install JSON support to PHP on CentOS in 10 Steps
2011-09-08 23:32
706 查看
http://www.arckid.com/blog/amfphp/how-to-add-install-json-support-to-php-on-centos-in-10-steps/
We are using staging server inside our organization (CentOS) to test the applications that we work on. We heavily use
AMFPHP based PHP services to do communication between business logic and client front end in flash.
Team requested to have native JSON support for PHP and I found a very simple way to do it as following:
Login to shell prompt with user credentials (which allows you to install stuff on server).
Execute command yum update “*php*”
This should update all PHP related components to the latest version. (Assuming you installed yum etc., on CentOS)
Once done that, You will require to install Pear based JSON support by following command.
pecl install json
This will install JSON, simply wait and cross your fingers! If it says OK in last 2 lines, everything is fine so far.
You will also require to enable JSON support in php.ini
Smart way to do that is, create a new file in /etc/php.d/ called
json.ini
The file should contain this line: extension=json.so
Finally, restart the HTTP (Apache) Server by command: service httpd restart
Done! Here is the all keyboard actions together, after you logged in:
yum update “*php*”
pecl install json
cd /etc/php.d/
echo “extension=json.so” >> json.ini
service httpd restart
We are using staging server inside our organization (CentOS) to test the applications that we work on. We heavily use
AMFPHP based PHP services to do communication between business logic and client front end in flash.
Team requested to have native JSON support for PHP and I found a very simple way to do it as following:
Login to shell prompt with user credentials (which allows you to install stuff on server).
Execute command yum update “*php*”
This should update all PHP related components to the latest version. (Assuming you installed yum etc., on CentOS)
Once done that, You will require to install Pear based JSON support by following command.
pecl install json
This will install JSON, simply wait and cross your fingers! If it says OK in last 2 lines, everything is fine so far.
You will also require to enable JSON support in php.ini
Smart way to do that is, create a new file in /etc/php.d/ called
json.ini
The file should contain this line: extension=json.so
Finally, restart the HTTP (Apache) Server by command: service httpd restart
Done! Here is the all keyboard actions together, after you logged in:
yum update “*php*”
pecl install json
cd /etc/php.d/
echo “extension=json.so” >> json.ini
service httpd restart
相关文章推荐
- How to Install PHP-FPM on CentOS 6.2
- How To Install Linux, nginx, MySQL, PHP (LEMP) stack on CentOS 6
- How to Install php-mcrypt on CentOS 6.2
- How to Install PostgreSQL 10 on CentOS/RHEL 7/6 and Fedora 26/25
- How to Install LAMP (Apache 2.4, MySQL 5.6, and PHP 5.4) on CentOS/RHEL 7
- How to Install Linux, Apache, MySQL, PHP (LAMP) stack on CentOS 6
- How to Install PHP 7 on CentOS/RHEL 7.1 & 6.7
- How to install Apache, PHP 7.1 and MySQL on CentOS 7.3 (LAMP)
- How to install php memcached on CentOS 6.5
- [转载]How To Install Nginx And PHP-FPM On CentOS 6 Via Yum
- How To Install Nginx, MariaDB 10, PHP 7 (LEMP Stack) in 16.10/16.04
- How to Install PHP 7 with Apache and MariaDB on CentOS 7/Debian 8
- [转]How to install PHP 5.3 on CentOS
- How to install ffmpeg,mp4box,mplayer,mencoder,flvtool2,ffmpeg-php on centos
- How To Install Linux, nginx, MySQL, PHP (LEMP) stack on CentOS 6
- Howto Install PHP 5.4, 5.5 or 5.6 on CentOS 6 and CentOS 7
- How to install HipHop for PHP on CentOS 5.x
- How to Install Linux, Apache, MySQL, PHP (LAMP) stack on CentOS 6 【Reliable】
- how-to-install-siege-on-centos-7
- how-to-install-hyper-v-on-a-virtual-machine-in-hyper-v.aspx