Re: display_errors off and custom error pages

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

 



On Tue, May 2, 2006 1:59 am, IG wrote:
>> You do not need, nor even want probably, ob_start() just to be able
>> to
>> use a custom error handler.
>>
>
> I thought I needed ob_start(), why don't I? If part of a page is
> outputted then it would be impossible to output an error page as html
> has already been sent out.

Here's the thing.

You want your error message to not reveal your internal workings of
your web application to the Bad Guys.

You want your web site to look "pretty".

No matter how good you are, nor how perfect a coder you are, there is
always room for SOME way for an error to manage to not happen until
after some HTML has gone "out"

So would it not make more sense to set up your error messages, and
your custom error handler, so that the basic paradigm is to:

  log the "real" error message with internal details for debugging
  print a "nice" error message for the user
  FINISH off any open tags, for a pretty error page
  end the script
> The other question is do custom error handlers
> work
> for parse errors?

No.

You should run every script through php -l before it ever gets near a
production server.

-- 
Like Music?
http://l-i-e.com/artists.htm

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