当前位置:网站首页>CentOS 6.3 下 PHP编译安装JSON模块报错解决
CentOS 6.3 下 PHP编译安装JSON模块报错解决
2022-07-04 13:55:00 【星哥玩云】
我在搭建监控系统时候出现JSON模块安装失败,PHP5.3 系统CentOS 6.3,安装json报错 ZVAL_DELREF 符号未知错误... # 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
经过查看是因为php版本造成,以下为解决方案:
# tar xf json-1.2.1.tgz # cd json-1.2.1 # pwd /root/桌面/json-1.2.1 # vim JSON_parser.c #define ZVAL_DELREF Z_DELREF_P //rpm安装PHP5.3不支持该符号,需要手动添加符号,然后在编译安装,前面的#号不要去掉,直接添加到文件前面就好.
# phpize //如果没有phpize命令,那么用yum去安装php-devel包 # ./configure # make && make install # find / -name *json.so //查看是否有json模块 /usr/lib64/php/modules/json.so # vim /etc/php.ini //添加以下行 extension=json.so # vim /etc/php.d/json.ini //创建json.ini文件,添加以下两行 ; Enable snmp extension module extension=json.so
测试php是否加载json模块: 1)使用php -m命令查看是否php已经加载json模块 # php -m json //查看打印出来的模块
2)使用php测试页查看验证
# vim/var/www/html/index.php //创建php浏览页,在其中添加以下内容
<?php phpinfo(); ?>
浏览器登录http://127.0.0.1/index.php 出现以下内容也证明安装加载成功
边栏推荐
- Five minutes per day machine learning: use gradient descent to complete the fitting of multi feature linear regression model
- 音视频技术开发周刊 | 252
- Ranking list of databases in July: mongodb and Oracle scores fell the most
- Redis 發布和訂閱
- 炒股网上开户安全吗?会不会被骗。
- selenium 元素交互
- LVGL 8.2 Line
- Who the final say whether the product is good or not? Sonar puts forward performance indicators for analysis to help you easily judge product performance and performance
- C language small commodity management system
- 从0到1建设智能灰度数据体系:以vivo游戏中心为例
猜你喜欢

智能客服赛道:网易七鱼、微洱科技打法迥异

内存管理总结

Quick introduction to automatic control principle + understanding

现代控制理论入门+理解

flutter 报错 No MediaQuery widget ancestor found.

Optimization method of deep learning neural network

Go zero micro service practical series (IX. ultimate optimization of seckill performance)

LVGL 8.2 LED

Helix Swarm中文包发布,Perforce进一步提升中国用户体验

IO flow: node flow and processing flow are summarized in detail.
随机推荐
Redis 發布和訂閱
信号处理之一阶RC低通滤波器宏指令实现(繁易触摸屏)
PLC Analog input analog conversion FC s_ ITR (CoDeSys platform)
EventBridge 在 SaaS 企业集成领域的探索与实践
C language personal address book management system
[C language] Pointer written test questions
找数字
LVGL 8.2 List
Ranking list of databases in July: mongodb and Oracle scores fell the most
Width and alignment
Optimization method of deep learning neural network
Deep learning 7 transformer series instance segmentation mask2former
remount of the / superblock failed: Permission denied
Combined with case: the usage of the lowest API (processfunction) in Flink framework
各大主流编程语言性能PK,结果出乎意料
LVGL 8.2 keyboard
leecode学习笔记-约瑟夫问题
5G电视难成竞争优势,视频资源成中国广电最后武器
微博、虎牙挺进兴趣社区:同行不同路
从0到1建设智能灰度数据体系:以vivo游戏中心为例