httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Neulinger" <>
Subject Re: Apache BUG
Date Wed, 17 Jul 1996 14:26:37 GMT
> You lost me here.  Why exactly can't you write your log files and update
> your databases before you send the Location header?  Perhaps I haven't been
> paying close enough attention to this discussion, but here is something
> I do all the time in mod_php parsed pages:
> <? if($condition && $some_other_condition) {
>      msql($db,"update table set field='$value' where field2='$value2'");
>      Header("Location: $URL");
>    }
>    else>
> <HTML>....</HTML>
> <?  endif>

That's fine if there is no potential output. But if there is any error 
condition or anything like that, or output, not only will it not 
redirect, it will give a server error cause the headers are screwed up.

I generally prefer not to do anything until the headers are output.

Just seems like a bad idea to kill stuff before it has finished. I can 
understand redirecting before it has finished, but should probably do 
something to let the script finish.

 -- Nathan

Nathan Neulinger                  Univ. of Missouri - Rolla
EMail:                    Computer Center
WWW:      SysAdmin:

View raw message