Hi
CLI PHP and Apache's PHP are different. Apache uses mod_php, while your CLI scripts are getting executed with /usr/bin/php, probably.
They _can_ (and quite often do) use different php.ini files. For example, on my Gentoo server:
$ ls /etc/php/*
/etc/php/apache2-php4:
lib php.ini
/etc/php/cli-php4:
php.ini
One thing you might want to try is:
$ diff /etc/php/*/php.ini
495,497c495
< ; allow_url_fopen = On
< ; Closed for security - <
[email protected]>
< allow_url_fopen = Off
---
> allow_url_fopen = On
This shows you the difference between the two different php.ini files. On your webserver, the paths are no doubt going to be different. Try:
$ locate php.ini
Hope this helps
--
Please contact me at:
Colin (dot) Horne (at) gmail (dot) com
My blog:
http://colinhorne.blogspot.com