Posted by Pugi! on 08/20/07 11:01
I use the function error_log for logging like this
if (!error_log($logmsg, 3, $dest)) {
throw new Exception('Failed to write to log');
}
and this inside an try catch block. In the catch I send an email.
For testing purposes I disabled write for apache user on the
destination directory.
I got the following message
Warning: error_log(path and logfile) [function.error-log]: failed to
open stream: Permission denied ...
Why do I get this message. I test for it, it is inside a try catch
block ...
It is still in development. On a production server I can do
error_reporting(E_ERROR) or in php.ini set display_errors=off. But why
a warning: I take care of it. Or is this normal ?
JM
[Back to original message]
|