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

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

 



On Fri, March 16, 2007 2:30 pm, Chris W. Parker wrote:
> 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?

If you have a syntax error, and PHP craps out before it can even begin
to run the script to produce output, exactly what output would you
expect to go to the browser?...

Don't display the errors, just log them.

Test the code to be sure it at least has a chance of running.

You can play with http://php.net/set_error_handler to try and do nifty
things on errors, but some errors fall ouside the pervue of that
function -- namely syntax errors caught before PHP can even begin to
run the script.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
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