1. Download the source file package:
wget http://www.aurore.net/projects/php-json/
2. Unzip
tar xvjf php-json-ext-1.2.0.tar.bz2
3. Enter the directory
cd php-json-ext -1.2.0
4. Initialize the PHP environment
phpize
reported an error: phpize commend not found
You need to install phpizeThis can be installed in yum
yum -y install php-devel
If you still cannot complete the PHP JSON installation, it means there is a problem with your compilation tool, just install it
yum -y install autoconf
yum -y install automake
yum -y install libtool
run phpize
(successful)
5../configure
6.make
7.makeinstall
8. Check whether the PHP JSON installation is successful
find / -name '*json.so'
. /usr/lib/php/modules/json.so
Instructions already exist
9. Modify php.ini
I include a folder in php.ini/ etc/php.d
Add a json.ini
vim json.ini
in this file with the following content:
extension=json.so
10. Restart the service
11. In phpinfo() you will see
json support enabled
json version
The above are all the steps for PHP JSON installation.
http://www.bkjia.com/PHPjc/446099.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/446099.htmlTechArticle1. Download the source file package: wget http://www.aurore.net/projects/php-json/ 2. Unzip tar xvjf php-json-ext-1.2.0.tar.bz2 3. Enter the directory cd php-json-ext-1.2.0 4. Initialize the PHP environment phpize report...