LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Install/Configuration (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=11)
-   -   Can't load multiple PHP pages at once (http://www.litespeedtech.com/support/forum/showthread.php?t=6417)

Banana Lord. 12-02-2012 08:15 AM

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.

NiteWave 12-02-2012 05:57 PM

how about open 2nd file in another browser ? can download 2 files at the same time ?

Banana Lord. 12-02-2012 05:59 PM

Quote:

Originally Posted by NiteWave (Post 37370)
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

NiteWave 12-02-2012 06:05 PM

please PM the website's domain name and brief the test steps, I test in my browser.

NiteWave 12-03-2012 03:58 AM

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.

Banana Lord. 12-03-2012 11:45 AM

Quote:

Originally Posted by NiteWave (Post 37430)
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

webizen 12-03-2012 12:48 PM

just replace 'Location: ...' with 'X-LiteSpeed-Location: /path/to/my/file'.

Banana Lord. 12-03-2012 12:58 PM

Quote:

Originally Posted by webizen (Post 37496)
just replace 'Location: ...' with 'X-LiteSpeed-Location: /path/to/my/file'.

Thanks, but my code is as follows currently:

http://anyup.me/v/uWwBOYXE

Would I replace readfile with X-LiteSpeed-Location?

NiteWave 12-03-2012 05:56 PM

should be, and you can comment out line 62-73.

Banana Lord. 12-03-2012 06:03 PM

Quote:

Originally Posted by NiteWave (Post 37535)
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?


All times are GMT -7. The time now is 06:05 PM.