[nycphp-talk] Asynchronous downloads -- how?
ken at secdat.com
Wed Sep 5 15:59:38 EDT 2007
Dan Cech wrote:
> Kenneth Downs wrote:
>> Let's say you have a link on a page,
>> www.example.com/friendly-url/file.mp3, which is actually being handled
>> by a PHP file that checks for subscription status and then sends the
>> file. It looks like a straight download to the user. So far so good.
>> Now let's say the file is 50MB, so that a download will take several
>> When the user initiates the download, and then attempts to go to another
>> page on the site, they cannot. All access to the site is waiting until
>> the download completes.
> 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.
> If the session is still active during the download, other requests with
> the same session id will hang while php waits for your download script
> to release the lock on the session file.
> Calling session_write_close() will end the session and relinquish the
> locks, allowing your other scripts to run.
> New York PHP Community Talk Mailing List
> NYPHPCon 2006 Presentations Online
> Show Your Participation in New York PHP
Secure Data Software, Inc.
631-689-7200 Fax: 631-689-0527
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the talk