|
|

12-02-2012, 08:15 AM
|
|
Member
|
|
Join Date: Mar 2011
Posts: 43
|
|
Can't load multiple PHP pages at once
I have a site that is supposed to serve files via a PHP page. If this PHP page is serving a file (ie. a 20MB file), nothing else will load at the same time. It waits for the current file to finish loading before loading the next one (and also means the site doesn't work in another tab). Is there some way to fix this? Thank you.
|

12-02-2012, 05:57 PM
|
|
LiteSpeed Staff
|
|
Join Date: Sep 2009
Posts: 2,295
|
|
|
how about open 2nd file in another browser ? can download 2 files at the same time ?
|

12-02-2012, 05:59 PM
|
|
Member
|
|
Join Date: Mar 2011
Posts: 43
|
|
Quote:
Originally Posted by NiteWave
how about open 2nd file in another browser ? can download 2 files at the same time ?
|
While downloading the file served by PHP in Chrome I cannot access any pages on the site in Chrome, but, while downloading a PHP-served file in Chrome I can access the site from Internet Explorer. Visa-versa for Internet Explorer.
I also have a friend that confirms the issue
|

12-02-2012, 06:05 PM
|
|
LiteSpeed Staff
|
|
Join Date: Sep 2009
Posts: 2,295
|
|
|
please PM the website's domain name and brief the test steps, I test in my browser.
|

12-03-2012, 03:58 AM
|
|
LiteSpeed Staff
|
|
Join Date: Sep 2009
Posts: 2,295
|
|
|
it's PHP script which limit the downloads.
looks like the PHP script use the session cookie to archive this goal.
in firefox, open a tab, can access a URL to download a 50M file,
when open 2nd tab, access same URL, it'll wait until 50M file download completed.
if open the URL in another browser, it starts downloading without wait.
then back to firefox, open firebug+firecookie, delete all cookies, then can open 2nd tab to download same file at the same time.
so it's not relating to web server, but PHP script do it purposely.
|

12-03-2012, 11:45 AM
|
|
Member
|
|
Join Date: Mar 2011
Posts: 43
|
|
Quote:
Originally Posted by NiteWave
it's PHP script which limit the downloads.
looks like the PHP script use the session cookie to archive this goal.
in firefox, open a tab, can access a URL to download a 50M file,
when open 2nd tab, access same URL, it'll wait until 50M file download completed.
if open the URL in another browser, it starts downloading without wait.
then back to firefox, open firebug+firecookie, delete all cookies, then can open 2nd tab to download same file at the same time.
so it's not relating to web server, but PHP script do it purposely.
|
Thanks for your help. It seems I can get around this by using the information on this page: http://www.litespeedtech.com/support...ernal_redirect
I am a bit unclear as to how to use this header. In the PHP file that processes/handles the download, should I simply replace all of my current headers to force the download and just use header("X-LiteSpeed-Location: /path/to/my/file");
Thanks
|

12-03-2012, 12:48 PM
|
|
LiteSpeed Staff
|
|
Join Date: Oct 2010
Posts: 2,390
|
|
|
just replace 'Location: ...' with 'X-LiteSpeed-Location: /path/to/my/file'.
|

12-03-2012, 12:58 PM
|
|
Member
|
|
Join Date: Mar 2011
Posts: 43
|
|
Quote:
Originally Posted by webizen
just replace 'Location: ...' with 'X-LiteSpeed-Location: /path/to/my/file'.
|
Thanks, but my code is as follows currently:

Would I replace readfile with X-LiteSpeed-Location?
|

12-03-2012, 05:56 PM
|
|
LiteSpeed Staff
|
|
Join Date: Sep 2009
Posts: 2,295
|
|
|
should be, and you can comment out line 62-73.
|

12-03-2012, 06:03 PM
|
|
Member
|
|
Join Date: Mar 2011
Posts: 43
|
|
Quote:
Originally Posted by NiteWave
should be, and you can comment out line 62-73.
|
Thanks, it seems to be working - but if I want to display image files I should use the readfile method, correct?
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 05:02 PM.
|
|