Centos6.3 PHP compile and install JSON module error resolution

Source: Internet
Author: User

I was setting up a monitoring system when the JSON module installation failed, PHP5.3 system Centos6.3, install JSON error zval_delref symbol unknown errors ...

# warning:php startup:unable to load Dynamic Library '/home/json/json-1.2.1/modules/json.so '-/home/json/json-1.2.1/mo dules/json.so:undefined symbol:zval_delref in Unknown on line 0

This is due to the PHP version, the following is the solution:



# Tar XF json-1.2.1.tgz

# CD json-1.2.1

# pwd

/root/ Desktop/json-1.2.1

# Vim JSON_PARSER.C

#define ZVAL_DELREF z_delref_p //rpm Install PHP5.3 does not support this symbol, you need to manually add symbols, and then in the compilation installation, the preceding # number do not remove, directly add to the front of the file.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/3C/CB/wKioL1PDVG_gora3AAEgC2v8HF4904.jpg "title=" 222. JPG "alt=" wkiol1pdvg_gora3aaegc2v8hf4904.jpg "/>

# phpize// If there is no phpize command, then use Yum to install the Php-devel package

#./configure

# Make && make install

# Find/-name *json.so// See if there is a JSON module

/usr/lib64/php/modules/json.so

# Vim/etc/php.ini// Add the following line

Extension=json.so

# Vim/etc/php.d/json.ini// Create the Json.ini file and add the following two lines

; Enable SNMP Extension Module

Extension=json.so


Test whether PHP loads the JSON module:

1) Use the PHP-M command to see if PHP has loaded the JSON module

# php-m

JSON//View the printed module

2) Use the PHP test page to view the validation

# vim/var/www/html/index.php//Create PHP Browse page, where to add the following content

<?php
Phpinfo ();
?>

Browser login http://127.0.0.1/index.php The following content also proves that the installation was successfully loaded

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/3C/CD/wKiom1PDWAyTX-OsAAGiycFQ8b8931.jpg "title=" Qq20140714120255.jpg "alt=" Wkiom1pdwaytx-osaagiycfq8b8931.jpg "/>




This article is from the "finalizing" blog, so be sure to keep this source http://beijing0414.blog.51cto.com/8612563/1437903

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.