JSON on RHEL & PHP 5.1.6

Stuck with PHP 5.1.6 on RHEL or even CentOS (and a sysadmin who insists on using packages)? Need JSON? I did. The solution is easy:

yum install php-devel
pecl install json

The pecl install failed when it hit an 8MB memory limit, and I was clueless about how to fix it until I learned that the pecl installer ignores the php.ini. Turns out the best solution is to use the pear installer (which does follow php.ini settings):

pear install pecl/json

6 Comments

  1. I paul hereby apply to ur company i am a native of nigeria.i was born in_ 1980 in ondo

  2. [...] json you will get an error about a 8MB limit the solution is to use pear – I found this thanks to this page [...]

  3. [...] JSON on RHEL & PHP 5.1.6 [...]

  4. Thanks man. This really helped.

  5. I was migrating a CakePHP site to Rackspace’s Cloud server and ran into this issue. No repository had it so it was the pecl install for me. Worked like a charm.

  6. I am having the trouble with JSON and PHP as well.

    I have followed all the steps; running php -r ‘var_dump(function_exists(”json_encode”))’ return TRUE;

    However as soon as I run this from a PHP script in apache; I get False;

    Anyone care to help?

    Thanks


Comments RSS TrackBack Identifier URI

Leave a comment

 

User contributed tags for this post:

php 5.1.6 json (198) - centos php json (148) - php 5.1 json (132) - json php 5.1 (131) - php json centos (111) - centos json (99) - yum install json (98) - php json rpm (96) - json php 5.1.6 (93) - json centos (90) - php-json rpm (89) - yum json (71) - yum php json (62) - Enable Json in PHP (57) - yum install php json (56) - php-json centos (45) - php-json-5.1.6 (45) - centos php-json (45) - php json 5.1.6 (42) - centos 5 php json (41) - yum install php-json (38) - install json (34) - php json 5.1 (34) - php 5.1.6 (33) - PHP json yum (32) - JSON rpm (31) - rhel php json (29) - json redhat (28) - json php centos (27) - rhel json (26) - json for php 5.1.6 (25) - centos json php (24) - json centos 5 (24) - php-json centos 5 (24) - redhat php json (23) - php json centos 5 (22) - yum json php (22) - php enable json (22) - php json rhel (21) - install json centos (20) - centos 5 json (20) - pear install json (19) - centos php json rpm (19) - install json php (19) - json yum (19) - php-json rpm centos (19) - centos pecl json (18) - pecl json centos (18) - json php rpm (18) - yum php-json (17) - enable json php (17) - json rhel (16) - pear install pecl/json (16) - yum pecl (16) - centos install json (16) - php json rpm centos (15) - php-json yum (15) - rhel5 php json (15) - centos install php json (15) - json RHEL5 (15) - php JSON Redhat (14) - redhat json (14) - json for php 5.1 (14) - php json centos rpm (13) - install php json centos (13) - centos php 5.1.6 (13) - PHP Version 5.1.6 json (12) - php centos json (12) - json in php 5.1 (12) - install (11) - php-json rhel5 (11) - pecl install json (11) - 5.1.6 json (11) - PHP 5.1.6 JSON rpm (11) - json php redhat (10) - php-json centos rpm (10) - centos php json yum (10) - json php yum (10) - json red hat (10) - json on php 5.1.6 (10) - php JSON yum install (10) - php 5.1.6 install json (9) - json rhel 5 (9) - php JSON (9) - RHEL php (9) - json install (9) - json php 5.1.2 (9) - rhel 5 php json (9) - install json php 5.1 (9) - php-json rhel (9) - yum install json php (9) - php json rhel5 (9) - centos php-json rpm (9) - php-pecl-json centos (9) - install json redhat (8) - php-json-5.1.6 rpm (8) - install php json (8) - php install json (8) - red hat php json (8) - centos php 5.1 json (8) - pear json (8) - php-5.1.6 (8) - how to install JSON (8) - rpm php-json (8) - rhel 5 json (8) - rhel5 json (8) - centos json install (8) - centos 5 php-json (8) - rpm php json (8) - centos 5 json php (7) - centos install pecl json (7) - json centos php (7) - install JSON centos 5 (7) - json 5.1.6 (7) - php-json 5.1.6 (7) - json php rhel5 (7) - json php rhel (7) - centos yum json (7) - RHEL5 pecl (7) - php json install (7) - php-json redhat (6) - json support PHP 5.1 (6) - php 5.1 install json (6) - pecl json install (6) - rhel pecl (6) - php 5.1.4 json (6) - php json rpm 5.1.6 (6) - php-json.rpm (6) - php-json rpm redhat (6) - php 5.1.6 json support (6) - json rpm centos (6) - install json php centos (6) - php json enable (6) - php pear json (6) - yum php 5.1.6 (6) - centos php-pecl-json (6) - php-json rpm CentOS 5 (5) - JSON php CentOS 5 (5) - pear json install (5) - how to install pecl json (5) - redhat php-json (5) - centos json php rpm (5) - php 5.1.2 json (5) - php json red hat (5) - rhel5 php-json (5) - yum install php-json centos (5) - yum php 5.1 (5) - pear pecl json (5) - install json php 5.1.6 (5) - how to enable json in php (5) -