Jump to content

Multiple Forced Downloads


PixelNurse

Recommended Posts

Hey Guys,

I'm having an odd problem and I was wondering if anybody knew of a solution or could tell me what's going on...

I have a page where there are multiple files the user need to download. Each of the file links goes to a PHP page which has a GET parameter passed to it. The parameter is then used to identify the file to download. It reads out a file from outside the webroot and forces it to download. That's working great, however there is one problem. Once the user clicks one link the file starts to download, however if they try to click another download link while the first file is still transferring it doesn't start to download until the first file has finished.

Is it not possible for PHP to serve multiple files at once? Just to be clear I'm not trying to have one processed page serve multiple files, but have the same page be hit multiple times each time serving out a different file.

I'd really appreciate any thoughts you guys had as this is really got me stumped and I'm having a devil of a time trying to get anything out of google on this issue.

Thanks in advance for any thoughts!
Link to comment
Share on other sites

OK clearly something much broader is going on as it's not just the other files that can't be download, but no other PHP page will be served until the file download has completed. Can something be wrong with my PHP configuration or is it likely to be my file download that's doing something evil?
Link to comment
Share on other sites

many webservers only allow one simultaneous download per IP, could that be your problem?

edit: just realized how stupid I sounded.

more like "many webservers do not allow simultaneous downloads per IP", as one download can't be simultaneous :)
Link to comment
Share on other sites

arrrggg can anyone post anymore? I can't seem to post the code snippet. Ahhh I think it's because it contains header statements? That must be what that sticky post is about :)

Edit 2: oh no it isn't, hmmm.. wonder why i can't post php code? Makes it a bit tricky to get your guys wisdom on this issue
Link to comment
Share on other sites

OK I'm getting nowhere. I don't think it is actually a problem with the PHP configuration either because I've just tested a scaled down version on another server (Linux rather than OS X) and it does the same on that server too. Only difference being that the subsequent requests timeout due to a lower request timeout setting on that server.

So short of anyone having any ideas, does anyone know of a more hardcore PHP forum I could try and pick the brains of?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.