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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux