Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Oct 2003
    Posts
    603
    Thanks
    2
    Thanked 1 Time in 1 Post

    readfile disables browsing the site?

    what would cause it so that when i do a force-download with readfile() it makes it so users cannot go to other pages on the site [until the download is done] even if i make the downloader open in a new window?

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Sorry... I misread the post... :-(
    Last edited by abduraooft; 03-04-2009 at 05:33 AM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder
    Join Date
    Oct 2003
    Posts
    603
    Thanks
    2
    Thanked 1 Time in 1 Post
    you think what's pretty impossible? i asked "what would cause it...." i dont see how "i think it's pretty impossible" is an answer to my question...

  • #4
    New Coder
    Join Date
    May 2006
    Posts
    81
    Thanks
    0
    Thanked 11 Times in 11 Posts
    There may be a limit on the server for the maximum simultaneous connections per client. While downloading the file they are using a connection, as soon as it is done they are able to open a new connection back to the server.

  • #5
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Quote Originally Posted by eu4ria View Post
    There may be a limit on the server for the maximum simultaneous connections per client. While downloading the file they are using a connection, as soon as it is done they are able to open a new connection back to the server.
    This is also what I would assume. Its a limitation imposed by the web service, not by PHP.
    HTTP is in itself stateless, so it wouldn't realize that the user is the same. If you're on a shared host, specifically a free one, they may be saving themselves throughput by imposing 1 connection limitations per domain. If you're paying for it, I'd find a new host (if this what's causing the problem).
    I've never had a problem with PHP causing a conflict like this before. Even CGI and CLI versions will spawn new processes. And if you're on *nix host, even ram won't be an issue; I used to host several sites on a 32MB optimized web server, and I had better throughput than I do now on my windows server.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •