PHP 5.3.8,JSON和放大器; CentOS 6的 [英] PHP 5.3.8, JSON & CentOS 6

查看:132
本文介绍了PHP 5.3.8,JSON和放大器; CentOS 6的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在运行的CentOS 6和PHP 5.3.8(作为Apache模块),它应该有JSON作为它的一部分的核心(有人告诉我)。综观#PHP -i 命令行我可以在配置命令看到' - 使JSON的共享=' ...太棒了!

We're running CentOS 6 and PHP 5.3.8 (as an apache module) which should have JSON as part of it's core (I'm told). Looking at # php -i on the command line I can see under Configure Command '--enable-json=shared' ... great!

不过,看着php_info()网页上的配置命令显示 - 禁止JSON的。

However, looking at php_info() on a web page Configure Command shows '--disable-json'.

我觉得没问题,我就用PECL安装它:

No problem I thought, I'll just install it using pecl:

# yum update php
# yum install php-pear
# yum install gcc
# pecl install json
# service httpd restart

成功,这有啥可做到这一点我想。但是PHP -m显示:

Success, that aught to do it I thought. However php -m shows:

PHP的警告:PHP启动:无法加载动态库'/usr/lib64/php/modules/json.so' - /usr/lib64/php/modules/json.so:在未知行ZVAL_DELREF:未定义的符号0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/json.so' - /usr/lib64/php/modules/json.so: undefined symbol: ZVAL_DELREF in Unknown on line 0

道歉,如果这是一个愚蠢的问题,但没有人知道是怎么回事,你可以点我就如何解决这一问题,使JSON开始工作方向是正确的?

Apologies if this is a silly question but does anyone know what's going on here and could you point me in the right direction on how to fix this so that JSON starts working?

非常感谢

推荐答案

想我会跟进解决方案。该PECL安装显得有点研究和一些建议我的想法的玩弄后,使用PHP 5.3.8发生冲突:

Thought I'd follow up with the solution. The PECL installation seemed to conflict with PHP 5.3.8 so after a bit of research and some advice I toyed with the idea of:

# yum remove php
# yum install php

然而,经过进一步的建议,而不是用了:

However, after further advice instead went with:

# yumdownloader php-common
# rpm -Uvh --force php-common*.rpm
# service httpd reload
# rm php-common*.rpm

这做的伎俩和JSON现在再次合作。希望这可以帮助别人。

This did the trick and JSON is now working again. Hope this helps someone else.

感谢

这篇关于PHP 5.3.8,JSON和放大器; CentOS 6的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆