当前位置:网站首页>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 出现以下内容也证明安装加载成功
边栏推荐
- Redis的4种缓存模式分享
- Introduction to asynchronous task capability of function calculation - task trigger de duplication
- Dialogue with ye Yanxiu, senior consultant of Longzhi and atlassian certification expert: where should Chinese users go when atlassian products enter the post server era?
- Programmers exposed that they took private jobs: they took more than 30 orders in 10 months, with a net income of 400000
- C language book rental management system
- 【大连理工大学】考研初试复试资料分享
- EventBridge 在 SaaS 企业集成领域的探索与实践
- numpy笔记
- SAIC Maxus officially released its new brand "mifa", and its flagship product mifa 9 was officially unveiled!
- Yyds dry goods inventory # solve the real problem of famous enterprises: continuous maximum sum
猜你喜欢
Quick introduction to automatic control principle + understanding
Comment configurer un accord
Flutter reports an error no mediaquery widget ancestor found
C1 certification learning notes 3 -- Web Foundation
Summary of common problems in development
I plan to teach myself some programming and want to work as a part-time programmer. I want to ask which programmer has a simple part-time platform list and doesn't investigate the degree of the receiv
Leetcode 1200 minimum absolute difference [sort] the way of leetcode in heroding
IO流:节点流和处理流详细归纳。
Is BigDecimal safe to calculate the amount? Look at these five pits~~
MySQL组合索引(多列索引)使用与优化案例详解
随机推荐
Node mongodb installation
Analysis of nearly 100 million dollars stolen and horizon cross chain bridge attacked
Details of FPGA underlying resources
【大连理工大学】考研初试复试资料分享
Summer Review, we must avoid stepping on these holes!
为什么国产手机用户换下一部手机时,都选择了iPhone?
Partial modification - progressive development
LVGL 8.2 LED
LVGL 8.2 Line wrap, recoloring and scrolling
Alcohol driving monitoring system based on stm32+ Huawei cloud IOT design
Force button brush question 01 (reverse linked list + sliding window +lru cache mechanism)
Implementation of macro instruction of first-order RC low-pass filter in signal processing (easy touch screen)
Helix Swarm中文包发布,Perforce进一步提升中国用户体验
5g TV cannot become a competitive advantage, and video resources become the last weapon of China's Radio and television
LVGL 8.2 List
go-zero微服务实战系列(九、极致优化秒杀性能)
如何配和弦
一篇文章学会GO语言中的变量
深度学习 网络正则化
Weibo and Huya advance into interest communities: different paths for peers