This just took me too long to figure out. I needed json_encode function, and it seems that the fedora yum repos. doesn’t have a very up-to-date version of php5. I didn’t want to have to go all out and configure and make php from scratch so I looked to pecl for help. After installing pear and much trying I found that I also needed the php-devel package in order to compile pecl packages. Then I also discovered that I need to specificaly enable the extension in the php config. I did it by creating a file in /etc/php.d called json.ini with the following:
; Enable json extension module
extension=json.so
Restart apache and it seems to be good.
Tags: extensions, json, pecl, php
October 21, 2008 at 11:55 am
Thank you. No other site (not even the PHP site) was so helpful as your comment.
January 26, 2009 at 3:04 pm
Man, you just saved my life!!!