JSON functions with PHP

Hey,

Does anybody know how to get the JSON functions to work with PHP + Interworx? I followed these directions, but had no luck after restarting Apache:

http://slaptijack.com/system-administration/lets-install-json-for-php-5/

Thanks in advanced :cool:

What version of PHP are you running? We provide “unsupported” PHP 5.2 RPMs (which have json_encode/decode built in) at http://updates.interworx.com/iworx/RPMS/unsupported/php5/, if that is any help.

5.1.6 CLI.

There are several RPMs… which RPM do you recommend I install?

Thanks in advanced.

You shouldn’t install the RPMs directly, you should probably add the following to a file in /etc/yum.repos.d/

“[interworx-4-unsupported]
name=interworx-4-unsupported
baseurl=http://updates.interworx.com/iworx/RPMS/unsupported/php5/cos5x/x86_64
enabled=1”

And remember to replace cos5x with your distro and x86_64 with your arch. After that’s done you can just rum “yum update php” and PHP 5.2 should get installed.

Interesting… I’ve added that to yum.repos.d and did a yum update php and json_encode still is not available. Any ideas?

Hi,

I’m fairly certain that the json module is included by those RPMS. Perhaps you just needed to restart the webserver after the php update?

Paul

[QUOTE=Pandora;17489]I followed these directions, but had no luck after restarting Apache:

http://slaptijack.com/system-administration/lets-install-json-for-php-5/
[/QUOTE]
For those who need JSON support: I’ve just got it working on my server following the instructions on that link. So you may want to give it a try before updating your php version :slight_smile: