当前位置:网站首页>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 出现以下内容也证明安装加载成功
边栏推荐
- 一篇文章搞懂Go语言中的Context
- IO流:节点流和处理流详细归纳。
- 大神详解开源 BUFF 增益攻略丨直播
- Luo Gu - some interesting questions
- Redis 发布和订阅
- Optimization method of deep learning neural network
- IO flow: node flow and processing flow are summarized in detail.
- When synchronized encounters this thing, there is a big hole, pay attention!
- Kubernets Pod 存在 Finalizers 一直处于 Terminating 状态
- [learning notes] matroid
猜你喜欢

如何搭建一支搞垮公司的技术团队?

Analysis of nearly 100 million dollars stolen and horizon cross chain bridge attacked
Redis的4种缓存模式分享

Luo Gu - some interesting questions

LVGL 8.2 Draw label with gradient color

Introduction to asynchronous task capability of function calculation - task trigger de duplication

夜天之书 #53 Apache 开源社群的“石头汤”

Redis 发布和订阅

现代控制理论入门+理解

The performance of major mainstream programming languages is PK, and the results are unexpected
随机推荐
Leetcode 1200 minimum absolute difference [sort] the way of leetcode in heroding
函数计算异步任务能力介绍 - 任务触发去重
Deep learning neural network case (handwritten digit recognition)
Redis哨兵模式实现一主二从三哨兵
C language small commodity management system
找数字
宽度精度
Deep learning 7 transformer series instance segmentation mask2former
C language set operation
hexadecimal
IO flow: node flow and processing flow are summarized in detail.
C language programming
Luo Gu - some interesting questions 2
深度学习 网络正则化
程序员自曝接私活:10个月时间接了30多个单子,纯收入40万
C language achievement management system for middle school students
Kubernets pod exists finalizers are always in terminating state
Programmers exposed that they took private jobs: they took more than 30 orders in 10 months, with a net income of 400000
Implementation of macro instruction of first-order RC low-pass filter in signal processing (easy touch screen)
左右对齐!