I have a PHP page that sends a file to the browser depending on the request data it receives. getfile.php?get=something sends file A, getfile.php?get=somethingelse sends file B and so on and so forth. This is done like so:
header('Content-Disposition: attachment; filename='. urlencode($filename));
readfile($fileURL);
It works except it can only send one file at a time. Any other files requested are send in linear fashion. One starts as soon as another finishes.
How can I get this to send files in parallel if the user requests another file while one is downloading?
Edit: I have tried downloading two files at the same time by directly using their filepaths and it works, so neither Apache, nor the browser seem to have a problem. It seems PHP is the issue. I have by the way used session_start() at the beginning of the page.