Install JSON Support to PHP on CentOS

Here’s a way to add JSON support for PHP on your CentOS server.
yum install php-pear php-devel gcc make
pecl install json
cd /etc/php.d
echo "extension=json.so" >> json.ini
service httpd restart
After these, you can easily check if it has been installed correctly. Either check your phpinfo() page or execute the following command.
php -i | grep -i json

/etc/php.d/json.ini,
json
json support => enabled
json version => 1.2.1
  • 118 Utenti hanno trovato utile questa risposta
Hai trovato utile questa risposta?

Articoli Correlati

Setting time with NTP in LINUX

NTP (Network Time Protocol) could be used to set time synced with ntp clocks, to do this use the...

Linux version & Operating System info

LINUX Version Info To learn the architecture and kernel version info use the shell command...

Compile and build Apache + MySQL + PHP from the source [cite]

This is a complete working solution to build Apache (httpd-2.2.25), MySQL (MySQL-5.6.14) and PHP...

Using vi Editor

Vi is the one of the mostly used editor in Linux via terminal. In most cases where Linux is used...

Build PHP5.5 on CentOS 6.4 with MSSQL Support [cite]

Most of the yum repos doesn’t include PHP5.5.X on current releases for the time being. So...