Posted by Good Man on 06/07/07 21:35
Phil Fenstermacher <phillip.fenstermacher@gmail.com> wrote in
news:1181249339.623046.226190@m36g2000hse.googlegroups.com:
> I've installed json.so using pecl and its in the right place, it is
> specified in the php.ini file, however when I run a script that calls
> either of the two json commands I get the "Fatal error: Call to
> undefined function json_encode()" error. I've restarted apache, and
> even restarted the entire machine that its running on. Permissions on
> the json.so file are the same as other libraries that are working.
> Any ideas?
PHP on Linux needs to be recompiled with the "configure" command when you
choose to add/remove extensions. The "php.ini" file won't do it.
ie: in your PHP directory...
prompt>: rm -f config.cache FIRST
prompt>: make clean
prompt>:
../configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs --disable-
debug --enable-ftp --enable-inline-optimization --enable-magic-quotes --
enable-mbstring **(etc etc etc, but here is where your json extension would
be enabled)***
prompt>: make
prompt>: make install
then restart apache
[Back to original message]
|