Re: Can't get PHP errors to display or log consistently
| From: | Jim Lucas | Date: | Fri, 16 Mar 2007 22:56:12 +0000 |
| Subject: | Re: Can't get PHP errors to display or log consistently | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-250726@lists.php.net to get a copy of this message | ||
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: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. Now do this <?php phpinfo(); ?> Look at the output_buffering, see if it is turned on and what size it is set to. Default is either 'On' or 4096 on most systems, I would suggest turning it off. Set it to '0' in your php.ini file. Hope this helps. -- Enjoy, Jim Lucas Different eyes see different things. Different hearts beat on different strings. But there are times for you and me when all such things agree. - Rush* using .htaccess to set the error reporting. * checking and double checking my php.ini file for the correctsetting.* 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. Anyideas? Thanks, Chris.