LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Can't load multiple PHP pages at once

Reply
 
Thread Tools Display Modes
  #1  
Old 12-02-2012, 08:15 AM
Banana Lord. Banana Lord. is offline
Member
 
Join Date: Mar 2011
Posts: 43
Default 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.
Reply With Quote
  #2  
Old 12-02-2012, 05:57 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,216
how about open 2nd file in another browser ? can download 2 files at the same time ?
Reply With Quote
  #3  
Old 12-02-2012, 05:59 PM
Banana Lord. Banana Lord. is offline
Member
 
Join Date: Mar 2011
Posts: 43
Quote:
Originally Posted by NiteWave View Post
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
Reply With Quote
  #4  
Old 12-02-2012, 06:05 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,216
please PM the website's domain name and brief the test steps, I test in my browser.
Reply With Quote
  #5  
Old 12-03-2012, 03:58 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,216
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.
Reply With Quote
  #6  
Old 12-03-2012, 11:45 AM
Banana Lord. Banana Lord. is offline
Member
 
Join Date: Mar 2011
Posts: 43
Quote:
Originally Posted by NiteWave View Post
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
Reply With Quote
  #7  
Old 12-03-2012, 12:48 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
just replace 'Location: ...' with 'X-LiteSpeed-Location: /path/to/my/file'.
Reply With Quote
  #8  
Old 12-03-2012, 12:58 PM
Banana Lord. Banana Lord. is offline
Member
 
Join Date: Mar 2011
Posts: 43
Quote:
Originally Posted by webizen View Post
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?
Reply With Quote
  #9  
Old 12-03-2012, 05:56 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,216
should be, and you can comment out line 62-73.
Reply With Quote
  #10  
Old 12-03-2012, 06:03 PM
Banana Lord. Banana Lord. is offline
Member
 
Join Date: Mar 2011
Posts: 43
Quote:
Originally Posted by NiteWave View Post
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?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:50 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.