mail.com]
> Sent: Saturday, November 09, 2002 5:43 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Handling Errors Gracefully
>
> Is there any way to gracefully handle errors that happen after output
to
> the
> screen has begun (the point where header(Location:) doesn't work)
imho there are many problems with a handler of this type... since an
error could occur anywhere--in the middle of an HTML tag, or within a
block of client-side script code--you don't know for sure that the
Javascript is going to be interpreted properly by the browser...and
therefore it may look mes
Ok, it's late, and my last post for today, but I need to get this right ;-)
',
'document.location.href="', $url, '">',
'',
'',
'A nasty error has occurred. If you are not redirected ',
'to the correct page, click here to',
'co
At 23:57 09.11.2002, Ernest E Vogelsinger said:
[snip]
>if ($we_found_an_error) {
>$url = 'http://' . $_SERVER['SERVER_NAME'] .
> '/my_error_handler.php?any_parameters_you_need';
>echo '',
> 'document.location.href="'
At 23:42 09.11.2002, Monty said:
[snip]
>Is there any way to gracefully handle errors that happen after output to the
>screen has begun (the point where header(Location:) doesn't work) without
>using ob_ functions?
>
>I have a separate PHP page I'd like to di
I think the only way to do it the way you want to do it is through
buffering (with the ob_functions or via the php.ini file). Turning off
error printing is another possibility--that way you can have the errors
logged to a file rather than to the screen.
Marco
--
php|architect - The
Just turn off display_errors in your php.ini file
On Sat, 9 Nov 2002, Monty wrote:
> Is there any way to gracefully handle errors that happen after output to the
> screen has begun (the point where header(Location:) doesn't work) without
> using ob_ functions?
>
> I have a separate PHP page I'd l
Is there any way to gracefully handle errors that happen after output to the
screen has begun (the point where header(Location:) doesn't work) without
using ob_ functions?
I have a separate PHP page I'd like to display with the error if one happens
using the error_handler() and trigger_error() fun
8 matches
Mail list logo