Re: session cookies
| From: | Rasmus Lerdorf | Date: | Fri, 02 Sep 2005 17:53:55 +0000 |
| Subject: | Re: session cookies | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-221773@lists.php.net to get a copy of this message | ||
Chris Shiflett wrote:
> Chris Shiflett wrote:
>
>> > And the browsers tend to redirect right away once they get this
>> > header.
>>
>> I would find that very surprising. Maybe I'll experiment.
>
>
> I tested this with Firefox 1.0.4, Firefox 1.0.6, and Safari 1.3. None of
> them request the new URL before receiving the previous response in its
> entirety. Maybe Internet Explorer does. :-)
Then you have configured your server to always turn on output buffering
or your test script is bad.
Try this:
<?php
header("Location: http://www.php.net");
$fp = fopen("/tmp/log.txt","w");
for($i=0; $i<1000000; $i++) {
$str = "Count $i\n";
echo $str;
fputs($fp, $str);
}
?>
What do you think you will see both on your screen and in /tmp/log.txt?
-Rasmus