I'm trying to loading JSON into the new-installed PHP5.3.1 on a CentOS server. Previously there was a PHP5.1 or near and due to the latest version of WordPress I had to upgrade the PHP.
I tried to install JSON via yum with:
yum install php-pecl-json
But I get a "php53-common is in conflict with php-common". With --skip-broken doesn't work, either.
I've tried it manually and got the JSON package via PEAR:
pear install pecl/json
After some errors regarding certain functions that are decrapted in this new version of PHP, I still got the following error on php -v:
# php -v 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 PHP 5.3.3 (cli) (built: Mar 30 2011 13:51:54)
Afterwards, I've installed JSON manually, entered the folder and did phpize prior to ./configure, make and make install. I also copied the json.so to /usr/lib64/php/modules. Nothing working so far.
The json.ini in /etc/php.d states:
extension = json.so
I did replace json.so from "extension = " with /usr/lib64/php/modules/json.so. And also entered "/usr/lib64/php/modules" as extension_dir into /etc/php.ini.
No luck. Can anyone help?
# yum repolist Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.mirror.lstn.net * epel: fedora-epel.mirror.lstn.net * extras: centos-distro.cavecreek.net * rpmforge: fr2.rpmfind.net * updates: mirrors.serveraxis.net base | 2.1 kB 00:00 epel | 3.7 kB 00:00 extras | 2.1 kB 00:00 rpmforge | 1.1 kB 00:00 updates | 1.9 kB 00:00 repo id repo name status base CentOS-5 - Base enabled: 3,535 epel Extra Packages for Enterprise Linux 5 - x86_64 enabled: 6,543 extras CentOS-5 - Extras enabled: 299 rpmforge RHEL 5 - RPMforge.net - dag enabled: 10,691 updates CentOS-5 - Updates enabled: 765 repolist: 21,833
UPDATE 2: JSON is already packed within php-common, so when installing PHP from REMI repo, for example, version 5.3.6 you'll already have JSON installed.
It seems that after that, trying to install JSON via pecl install json or manually will output the error I've stated above.