I have a PHP script running just fine through Apache, but it fails when running in CLI, so I want to find out what is happening.
For this, I'd like to see the error log, but the CLI error log I set is not working. I have set this in the proper php.ini file, which is confirmed when I obtain the error log details through the command line:
php -i | grep error
Result:
display_errors => Off => Off
display_startup_errors => Off => Off
error_append_string => no value => no value
error_log => /var/log/php_error_log => /var/log/php_error_log
error_prepend_string => <font color=ff0000> => <font color=ff0000>
error_reporting => 30711 => 30711
html_errors => Off => Off
ignore_repeated_errors => Off => Off
log_errors => On => On
log_errors_max_len => 1024 => 1024
track_errors => Off => Off
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
suhosin.disable.display_errors => Off => Off
suhosin.sql.bailout_on_error => Off => Off
So error_log
and log_errors
are both set. However, no logs are actually saved. Permissions are in place. So what can it be?
I've read the question PHP CLI won't log errors, but I could not find a solution in there.