Re: Question about error_reporting()

From: Date: Fri, 01 Oct 2004 16:13:18 +0000
Subject: Re: Question about error_reporting()
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-198440@lists.php.net to get a copy of this message
Greg Donald wrote:
On Fri, 01 Oct 2004 10:36:28 -0400, Al <news@ridersite.org> wrote:
If I place this at the top of my script file, the page just hangs. error_reporting (E_ERROR | E_WARNING); A virtual host on a Unix/Apache system. Runs fine without the error_reporting(). The default system error reporting only shows E_ERRORS, so I wanted to see warnings also.
Comment the entire script out starting below your call to error_reporting(), then start uncommenting and testing it from the top down until you find the issue. It's doubtful error_reporting() is causing the issue, it more likely it's uncovering an issue. You might try E_ALL, as it may help you discover the issue faster. Posting the script and getting some more eyes on it also an option. What's puzzling is that I can simply comment out the error_reporting line and the code runs fine.
Also, the Apache error log doesn't show any errors. with or without the error_reporting. Is error_reporting() all that is necessary, or must I also have a error_log() statement? The manual is not clear on this point. Also, must I have a an existing error file for the errors to append to? Again, thanks.

« previous php.general (#198440) next »