当前位置:网站首页>Solve the error of JSON module in PHP compilation and installation under CentOS 6.3

Solve the error of JSON module in PHP compilation and installation under CentOS 6.3

2022-07-04 15:15:00 Brother Xing plays with the clouds

When I was setting up the monitoring system JSON Module installation failed ,PHP5.3  System CentOS 6.3, install json Report errors ZVAL_DELREF Unknown symbol error ... # Warning: PHP Startup: Unable to load dynamic library '/home/json/json-1.2.1/modules/json.so' - /home/json/json-1.2.1/modules/json.so: undefined symbol: ZVAL_DELREF in Unknown on line 0

After checking, it is because php Version caused , Here's 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 This symbol is not supported , You need to add symbols manually , Then compile and install , Ahead # No. don't remove it , Just add it directly to the front of the file .

# phpize  // without phpize command , Then use yum To install php-devel package # ./configure # make && make install # find / -name *json.so    // Check to see if there is json modular /usr/lib64/php/modules/json.so # vim /etc/php.ini    // Add the following lines extension=json.so # vim /etc/php.d/json.ini    // establish json.ini file , Add the following two lines ; Enable snmp extension module extension=json.so

test php Whether to load json modular : 1) Use php -m Command to see if php Already loaded json modular # php -m  json      // Check the printed module

2) Use php Test page view verification

# vim/var/www/html/index.php      // establish php Browse page , Add the following

<?php phpinfo(); ?>

Browser login http://127.0.0.1/index.php  The following content also proves that the installation and loading are successful

原网站

版权声明
本文为[Brother Xing plays with the clouds]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/185/202207041353316343.html

随机推荐