Re: [PHP] PHP download page blocking other HTTP requests
On 7 June 2011 09:24, Pete Ford wrote: > On 06/06/11 21:07, Richard Quadling wrote: >> >> On 6 June 2011 13:55, Pete Ford wrote: >>> >>> Is there something on the Apache/PHP end that might be causing this >>> blocking? (Apache 2.2.10, PHP 5.2.14) >> >> The browser and / or OS may be obeying the settings about the number >> of simultaneous connections per host. >> http://support.microsoft.com/kb/183110 / >> http://www.ietf.org/rfc/rfc2616.txt 8.1.4 Practical Considerations ... >> >> " Clients that use persistent connections SHOULD limit the number of >> simultaneous connections that they maintain to a given server. A >> single-user client SHOULD NOT maintain more than 2 connections with >> any server or proxy. A proxy SHOULD use up to 2*N connections to >> another server or proxy, where N is the number of simultaneously >> active users. These guidelines are intended to improve HTTP response >> times and avoid congestion." >> >> Also, (from googling) >> >> http://forums.serverbeach.com/showthread.php?6192-Max-Concurrent-Connections-Per-Host, >> mod_throttle and/or mod_bandwidth may be capable of restricting the >> number and/or speed of connections. >> > > Thanks Richard, > > There's no mod_throttle or mod_bandwidth, but I SHOULD have remembered > RFC2616. I'll look into working with that, although I'm having trouble > reproducing the problem since my dev machine sits on the same network as the > server and the files come down too quickly! > Maybe I can use a redirect or something to force a new connection... > One option may be to use a sub-domain for the downloads, that way, you could allow the main site to run as fast as needed and have downloads on a different setup and not subject to the same limit. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP download page blocking other HTTP requests
On 06/06/11 21:07, Richard Quadling wrote: On 6 June 2011 13:55, Pete Ford wrote: Is there something on the Apache/PHP end that might be causing this blocking? (Apache 2.2.10, PHP 5.2.14) The browser and / or OS may be obeying the settings about the number of simultaneous connections per host. http://support.microsoft.com/kb/183110 / http://www.ietf.org/rfc/rfc2616.txt 8.1.4 Practical Considerations ... " Clients that use persistent connections SHOULD limit the number of simultaneous connections that they maintain to a given server. A single-user client SHOULD NOT maintain more than 2 connections with any server or proxy. A proxy SHOULD use up to 2*N connections to another server or proxy, where N is the number of simultaneously active users. These guidelines are intended to improve HTTP response times and avoid congestion." Also, (from googling) http://forums.serverbeach.com/showthread.php?6192-Max-Concurrent-Connections-Per-Host, mod_throttle and/or mod_bandwidth may be capable of restricting the number and/or speed of connections. Thanks Richard, There's no mod_throttle or mod_bandwidth, but I SHOULD have remembered RFC2616. I'll look into working with that, although I'm having trouble reproducing the problem since my dev machine sits on the same network as the server and the files come down too quickly! Maybe I can use a redirect or something to force a new connection... -- Peter Ford, Developer phone: 01580 89 fax: 01580 893399 Justcroft International Ltd. www.justcroft.com Justcroft House, High Street, Staplehurst, Kent TN12 0AH United Kingdom Registered in England and Wales: 2297906 Registered office: Stag Gates House, 63/64 The Avenue, Southampton SO17 1XS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP download page blocking other HTTP requests
On 6 June 2011 13:55, Pete Ford wrote: > Is there something on the Apache/PHP end that might be causing this > blocking? (Apache 2.2.10, PHP 5.2.14) The browser and / or OS may be obeying the settings about the number of simultaneous connections per host. http://support.microsoft.com/kb/183110 / http://www.ietf.org/rfc/rfc2616.txt 8.1.4 Practical Considerations ... " Clients that use persistent connections SHOULD limit the number of simultaneous connections that they maintain to a given server. A single-user client SHOULD NOT maintain more than 2 connections with any server or proxy. A proxy SHOULD use up to 2*N connections to another server or proxy, where N is the number of simultaneously active users. These guidelines are intended to improve HTTP response times and avoid congestion." Also, (from googling) http://forums.serverbeach.com/showthread.php?6192-Max-Concurrent-Connections-Per-Host, mod_throttle and/or mod_bandwidth may be capable of restricting the number and/or speed of connections. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP download page blocking other HTTP requests
I have a file download 'guardian' page which does something like this: $size = filesize($path); $fi = @finfo_file($path, FILEINFO_MIME_TYPE); @header('Content-type: ' . $fi); @header('Content-Length: ' . $size); @readfile($path); exit; ($path is derived from parameters in the request, including checks for nasties and some access control checks in the system) When a link is clicked which points to this script, the file is downloaded (well and good...), but in Firefox (3.x, 4.x at least), it seems to block any further interaction with the browser until the download is complete - some of the files are 60Gb and the server is on a 2mbit line, so it can take some time to download. Is there something on the Apache/PHP end that might be causing this blocking? (Apache 2.2.10, PHP 5.2.14) I suspect not, since using Chrome as the browser doesn't appear to have the same problem, but I wondered whether there was some way that FF was handling the headers might be causing it. I can't seem to devise a suitable Google search to get any mention of similar behaviour so I thought I'd ask some experts :) -- Peter Ford, Developer phone: 01580 89 fax: 01580 893399 Justcroft International Ltd. www.justcroft.com Justcroft House, High Street, Staplehurst, Kent TN12 0AH United Kingdom Registered in England and Wales: 2297906 Registered office: Stag Gates House, 63/64 The Avenue, Southampton SO17 1XS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Download Page?
Kevin, You will need to send the header information for the file...then you can do a new header so that you show the "thank you for downloading" page... Thank you, RAY HUNTER -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 12:49 PM To: PHP General Subject: Re: [PHP] Download Page? Common question becuase of it's somewhat unintuitive nature, but it is very simple. Do a search for keywords "header" and "Content-disposition". That should reveal what you want. Good luck. -Kevin - Original Message - From: "Nick Richardson" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Thursday, June 06, 2002 12:38 PM Subject: [PHP] Download Page? > Hi all, > > I was wondering how i could make a download 'landing' page, that once a user > has filled out the download form and submitted it, it will send the file > they are requesting as a download (not display a link to it, or display it > in the browser) and also render a page that says something like "thanks for > downloading blah blah..." behind it at the same time. > > I would assume i would have to use header() to do this, but i dont know > where i should start, a/o what headers to send. > > Any help would be appreciated. > > Thanks! > > //Nick Richardson ([EMAIL PROTECTED]) > //SiteCommand LLC > ---=--- > --] SiteCommand Control Panel: Coming June 1st, 2002 [-- > --] 'The Secure Solution To Easy Enterprise Management' [-- > ---=--- > --] Visit http://www.sitecommand.com to PreOrder Now [-- > ---=--- > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download Page?
Common question becuase of it's somewhat unintuitive nature, but it is very simple. Do a search for keywords "header" and "Content-disposition". That should reveal what you want. Good luck. -Kevin - Original Message - From: "Nick Richardson" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Thursday, June 06, 2002 12:38 PM Subject: [PHP] Download Page? > Hi all, > > I was wondering how i could make a download 'landing' page, that once a user > has filled out the download form and submitted it, it will send the file > they are requesting as a download (not display a link to it, or display it > in the browser) and also render a page that says something like "thanks for > downloading blah blah..." behind it at the same time. > > I would assume i would have to use header() to do this, but i dont know > where i should start, a/o what headers to send. > > Any help would be appreciated. > > Thanks! > > //Nick Richardson ([EMAIL PROTECTED]) > //SiteCommand LLC > ---=--- > --] SiteCommand Control Panel: Coming June 1st, 2002 [-- > --] 'The Secure Solution To Easy Enterprise Management' [-- > ---=--- > --] Visit http://www.sitecommand.com to PreOrder Now [-- > ---=--- > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Download Page?
Hi all, I was wondering how i could make a download 'landing' page, that once a user has filled out the download form and submitted it, it will send the file they are requesting as a download (not display a link to it, or display it in the browser) and also render a page that says something like "thanks for downloading blah blah..." behind it at the same time. I would assume i would have to use header() to do this, but i dont know where i should start, a/o what headers to send. Any help would be appreciated. Thanks! //Nick Richardson ([EMAIL PROTECTED]) //SiteCommand LLC ---=--- --] SiteCommand Control Panel: Coming June 1st, 2002 [-- --] 'The Secure Solution To Easy Enterprise Management' [-- ---=--- --] Visit http://www.sitecommand.com to PreOrder Now [-- ---=--- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php