Pecl json extension

March 11, 2008

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: , , ,

2 Responses to “Pecl json extension”

  1. derpflanz Says:

    Thank you. No other site (not even the PHP site) was so helpful as your comment.

  2. Alex Says:

    Man, you just saved my life!!!


Leave a Reply