NYCPHP Meetup

NYPHP.org

[nycphp-talk] Asynchronous downloads -- how?

David Krings ramons at gmx.net
Fri Sep 7 20:06:51 EDT 2007


csnyder wrote:
> On 9/5/07, Kenneth Downs <ken at secdat.com> wrote:
>>   This may be an over-simplification, but
>> are you using
>> session_write_close() after the authentication phase is complete?
>>
>>
>>  Dan, I owe you a beer.  That was it.
> 
> 
> Wow. Every now and then, the high cost of a subscription to this list
> is worth it.
> 
> Great call, Dan, I had no idea that session_write_close() even
> existed, and I serve _everything_ via php. It was like getting the APC
> speed-boost all over again!
> 
> 

Based on what posts about writing to a session in PHP state it is highly 
recommended to execute a session_write_close() before a header redirect 
as it can be that the browser already got redirected before the server 
is done writing the session data. With session_write_close() that will 
be guaranteed before anything else happens.

But based on a different thread we shouldn't use sessions anyway, right?

David




More information about the talk mailing list