NYCPHP Meetup

NYPHP.org

[nycphp-talk] File Download Question

Dan Cech dcech at phpwerx.net
Thu Oct 20 14:28:36 EDT 2005


No worries, I'm glad it worked out for you!

Dan

Eddie Haber wrote:
> Dan,
> 
> You're a miracle worker! I had been wondering about this one for a couple
> weeks. That fixed the problem. Thank you so much!
> 
> Eddie
> 
> 
> On 10/20/05 1:59 PM, "Dan Cech" <dcech at phpwerx.net> wrote:
> 
>> Eddie,
>>
>> It sounds to me like you may have an issue with your sessions, as
>> presumably the php download script is blocking your other pages from
>> accessing the session.
>>
>> If you put a call to session_write_close
>> (http://www.php.net/session_write_close) after anything that needs
>> access to the session but before the portion of the script that takes a
>> long time, it should fix your problem.
>>
>> Dan
>>
>>
>> Eddie Haber wrote:
>>> I have a file download area on my site. Users click a link, a JS pop-up
>>> window pops with a meta-refresh tag that refreshes to the file to be
>>> downloaded. The pop-up window also refreshes (reloads) the opener page.
>>>
>>> Everything works great, except one problem. I am using a PHP script as a
>>> gatekeeper/passthru for the file to be downloaded. Once the file download
>>> begins, no other links on the browser (parent or pop-up) will resolve until
>>> the download is over or is stopped. The second the download stops, any
>>> clicked on link resolves.
>>>
>>> The odd part is: If the meta-refresh in the pop-up goes directly to the zip
>>> file, the browser can link away without problem. But if meta-refresh links
>>> to the php script that dispenses the file, the links won't resolve during
>>> download. Script is below.
>>>
>>> Much appreciated! Thank you,
>>> Eddie



More information about the talk mailing list