I'm calling a php script using CRON.
The script use a lot the error_log function :
error_log('My error');
Seems like it's not working from CLI.
I can make it work by using more arguments :
error_log('My error', 3, '/fullpath/to/my/log');
But I would like to avoid modifying everything (my script include a lot of other scripts).
As far as I understand, PHP is using a different php.ini when called from command line.
Is there a way to force it to use the normal php.ini ?
I need my cron to execute this script in the exact same environment that from the web.
Are there problems I should be aware of ? Others differences that could break my code ?
Edit :
I found a way to tell php which php.ini file to use (-c):
/path/to/php5 -c /path/to/php.ini /path/to/script.php
But it's not working.
In my script shell_exec('php --ini') is still showing cli/php.ini...