JSON - A PHP Extension For Linux
In this post I will show you how to install JSON extension for your PHP support. I selected CentOS 5.6 for JSON installation for my PHP 5.2, but don't worry this installation also works on many UNIX-like distribution. Let's begins installation procedure by following steps.
How To Install JSON In Linux
1. Let's first install the required dependencies for JSON with YUM tool.# yum install gcc make php php-pear php-devel2. Use PECL (PHP Extension Community Library) to download the JSON tool.
# pecl download json3. Extract the downloaded JSON package with TAR commands.
# tar -xvf json-1.2.1.tgz4. Next install JSON package with using below commands.
# cd json-1.2.1 # phpize # ./configure # make # make install5. Now create a file json.ini under /etc/php.d.
# touch /etc/php.d/json.ini6. Now add following lines to json.ini file.
# vi /etc/php.d/json.ini
; Enable json extension module extension=json.so7. Next restart Apache service.
# service httpd restart8. Test JSON extension working or not.
# php -m | grep json9. Done! If you are facing any problem while installing JSON, please leave a comment below I will surely help you out.
0 comments: