Enabling JSON on PHP 5.1.2 in SLES10
JSON is a trivial package feature and the extension already comes built-in with PHP 5.2.x so this is not so much a problem for users of the latest PHP build. However, if you are using SLES10 SP1 and below, and haven’t updated PHP and still uses 5.1.x then you’ll be in for a surprise. JSON isn’t available in the default install, let alone a package that you can get from YAST, unless you have updated your Installation Sources.
The quickest and simplest way is not to depend on vanilla sources but rather to use PEAR since it is already in SLES10.
1. Open YAST.
2. In Software Management, search for
php-develand install it.php-develprovidesphpizewhich PEAR will be using later on to install the JSON package.3. Open Terminal, and run the command as root:
pear5 channel-update pear.php.net
4. In Terminal still, follow it up with:
pear5 install pecl/json
This will install the latest JSON package.
After installing JSON, locate your php.ini , and add the line in the Dynamic Extensions section.
extension=json.so
Save php.ini and restart Apache.
Congratulations! Enjoy.
Technorati
php, json, apache, linux, sles10
Site Search Tags: php, json, apache, linux, sles10







