My PHP version is 5.1.6
I have install Json by follow the instructions:
# yum install php-devel
# yum install php-pear
# yum install gcc
# pear install json
# cd /etc/php.d
# echo "extension=json.so" > json.ini
# service httpd restart
[root@69-64-69-43 ~]# php -i | grep json
json support => enabled
json version => 1.2.1
[root@69-64-69-43 ~]# php -r 'var_dump(function_exists("json_encode"));'
Fatal error: Call to undefined function json_encode() in /var/www/vhosts/ykite.com/httpdocs/fre/json.php on line 8
var_dump( function_exists( 'json_encode' ) ) returns true, while your HTTP request says the function doesn't exist; there's only one explanation I can think of: CLI and HTTP requests use a different php.ini. In your
phpinfo( ) document, it says that it's loading json.ini, but I don't see any other reference to JSON in there.
Check your logs to see whether or not json.so is actually loaded upon a HTTP request. My bet is that it isn't.