Activities

October 2009
M T W T F S S
« Aug   Nov »
 1234
567891011
12131415161718
19202122232425
262728293031  

Enabling JSON on php5

This little tweak will help you enable json module on php. Unfortunately “YUM ” method won’t work as it’s not support native json .

Open a terminal window execute.

1.

<strong>pecl install json

2. create a file by # vi /etc/php.d/json.ini then add the line ” extension=json.so ”

or echo ” extension=json.so ” >> etc/php.d/json.ini

3. restart Apache

service httpd restart or apache2ctl restart

That’s it. You can find the module enable in phpconfig page

or execute [root@web-test1 ~]# php -r ‘ phpinfo();’ |grep json result will be like this

[root@web-test1 ~]# php -r ‘ phpinfo();’ |grep json
/etc/php.d/json.ini,
json
json support => enabled
json version => 1.2.1

Unfortunately Cpanel doesn’t support it
-enjoy


Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>