It's OK (compatible) to install PECL native JSON (from here) in PHP 5.0.4, on a production server running FC4 where unfortunately I cannot update PHP to at least 5.2 ?
If there is a good chance to screw up PHP instalation on the server, I will not try to install it, and I will stick to Service JSON ( http ://svn.php.net/viewvc/pear/packages/Services_JSON/trunk/ )
In documentation ( http ://aurore.net/projects/php-json/ ) I have found:
A simple ./configure; make; make install should do the trick. Make sure to add an extension=json.so line to your php.ini/php.d.
(but I can't find anythink about compatible versions of PHP)
Thank you.
(Please don't tell me to update the OS and PHP, beacause it's not my decision :( )
the PECL extension will work with any PHP versions >= 4.3.0 so if your php version on FC4 is that you should be able to install it
PECL extensions need to match the version of the PHP build; the easiest way I've found for using PECL is to use the download function and build the rest yourself.
Then skip make install and copy ./modules/json.so to /path/to/php/lib/modules (modules dir may need creating)
Then edit your php.ini file to add extension=json.so
Restart PHP, if it doesn't work, just comment the extension line you added, and you're back to normal. Very low impact and you have total control over the entire process.
Hope this helps, but the above is off the top of my head and doesn't constitute the only way to do things.
Andrew
PS You could always install the version that's in production on your test machine and build the extension that way.