pecl install json

You may face issues while executing the above command if /tmp and  /var mounted in nonexec. So remount them using the following commands.

mount -v -o remount,exec /tmp
mount -v -o remount,exec /var/tmp

Note down the path of json.so and check with php -m  or with phpinfo() page. Remember to restart Apache.

Advertisements