Reply to How to catch a warning ?

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация