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
Posted May 28, 2008 by Casey Bisson
Categories: Technology. Tags: documentation, install, json, linux, php, red hat, rhel, system administration, yum.
6 Comments
Comments RSS
TrackBack Identifier URI
User contributed tags for this post:
php 5.1.6 json (189) - centos php json (140) - php 5.1 json (125) - json php 5.1 (123) - php json centos (105) - centos json (94) - php json rpm (94) - yum install json (93) - json centos (86) - php-json rpm (86) - json php 5.1.6 (85) - yum json (71) - yum php json (61) - yum install php json (54) - Enable Json in PHP (54) - centos php-json (45) - php-json-5.1.6 (44) - php-json centos (43) - php json 5.1.6 (40) - centos 5 php json (39) - yum install php-json (36) - install json (34) - PHP json yum (31) - php json 5.1 (31) - php 5.1.6 (30) - JSON rpm (30) - rhel php json (29) - json redhat (28) - rhel json (26) - json php centos (25) - centos json php (23) - json centos 5 (23) - php-json centos 5 (23) - php json centos 5 (22) - php enable json (22) - json for php 5.1.6 (22) - php json rhel (21) - redhat php json (21) - yum json php (20) - centos 5 json (20) - json yum (19) - php-json rpm centos (19) - centos pecl json (18) - install json centos (18) - json php rpm (18) - pear install json (17) - centos php json rpm (17) - pecl json centos (17) - yum php-json (16) - enable json php (16) - yum pecl (16) - centos install json (16) - json rhel (15) - pear install pecl/json (15) - install json php (15) - php json rpm centos (14) - redhat json (14) - json RHEL5 (14) - php-json yum (13) - rhel5 php json (13) - php json centos rpm (13) - php JSON Redhat (13) - install php json centos (13) - centos php 5.1.6 (13) - PHP Version 5.1.6 json (12) - php centos json (12) - centos install php json (12) - json for php 5.1 (12) - install (11) - php-json rhel5 (11) - pecl install json (11) - 5.1.6 json (11) - json in php 5.1 (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) - php-json rhel (9) - yum install json php (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) - how to install JSON (8) - rpm php-json (8) - install json php 5.1 (8) - rhel 5 json (8) - php json rhel5 (8) - centos json install (8) - centos 5 php-json (8) - centos 5 json php (7) - json centos php (7) - pear json (7) - php-5.1.6 (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) - rhel5 json (7) - centos yum json (7) - RHEL5 pecl (7) - rpm php json (7) - json support PHP 5.1 (6) - php 5.1 install json (6) - centos install pecl 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) - install json php centos (6) - php json install (6) - php json enable (6) - php pear json (6) - centos php-pecl-json (6) - php-json redhat (5) - 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) - yum install php-pecl-json (5) - centos json rpm (5) -
I paul hereby apply to ur company i am a native of nigeria.i was born in_ 1980 in ondo
[...] json you will get an error about a 8MB limit the solution is to use pear – I found this thanks to this page [...]
[...] JSON on RHEL & PHP 5.1.6 [...]
Thanks man. This really helped.
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.
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