Re: Can't get PHP errors to display or log consistently

From: Date: Fri, 16 Mar 2007 23:03:51 +0000
Subject: Re: Can't get PHP errors to display or log consistently
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-250729@lists.php.net to get a copy of this message
On Fri, 2007-03-16 at 15:56 -0700, Jim Lucas wrote: > Chris W. Parker wrote: > > Hello, > > > > Using CentOS 4 and I can't get errors to display on the page AT ALL or > > log errors consistently. Some errors get logged (forgetting to us > > $this-> in a class for example) but most don't. > > > > I've tried: > > * using .htaccess to set the error reporting. > > * checking and double checking my php.ini file for the correct > > setting. > > * using error_reporting(E_ALL) at the top of my page. > > > > Nothing works. > > > > When a page has an error it's goes blank. Nothing is sent to the client. > > > > There must be a setting somewhere that is overriding all of this. Any > > ideas? > > > > > > Thanks, > > Chris. > > > > try this in a error_test.php file on your web server > > [error_test.php] > <?php > error_reporting(E_ALL); > ini_set('display_errors','On'); > > echo 'Trying...'; > > # Call undefined function > my_undefined_function(); > > echo ' to fail!!!'; > > ?> > > This should display an error. > > Could be that the buffer isn't being dumped to the browser before a > fatal error. Only time I've ever seen that happen is when the process segfaults. I almost always work with output buffering on, and have never seen a fatal error disappear while it's enabled. Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------'

« previous php.general (#250729) next »