Re[2]: Delivering large files via PHP (>300MB)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello rouvas,

Tuesday, December 14, 2004, 1:33:07 PM, you wrote:

r> Why don't you take the PHP out of the loop entirely?
r> Make a dir into the Apache area with a custom .htaccess
r> (with usernames/passwords, etc) and put the required files there.

Then the files have to be within the web root and it'll only take one
person to share out the username/password. It needs controlling as to
who can download and how many times. PHP has to be in the loop
somewhere (although granted, not for the actual file delivery).

r> From the thread I understood that you don't split the file into smaller
r> chunks, but instead server chunks from the same big file. This is bad
r> practice, as I've found out from personal experience. It is better to serve
r> small files as they finish earlier and free the server processes.

What's the difference between serving a small 1MB file, and reading in
1MB of data from a 300MB file, closing that read operation and then
outputting the result? I cannot see how actually splitting the file
into 1MB chunks on the server will make it finish earlier. 1MB of data
is 1MB of data, regardless how PHP read it in. The only real advantage
might be in disk seek times however, so PHP wouldn't have to seek into
the middle of a large file for example.

r> Also, this would allow users that already have other download accelerators
r> installed to grab the files.

Download accelerators need a direct link to the file itself. The
moment we have that, we're back to square one again.

If it was that simple then when you buy something like a Symantec
product on-line they'd just give you a link to the file. But they
don't, you have to download their package installer app first. Large
game downloads work in a similar way (Direct2Disk, Gigex Download,
etc). I do not believe this is an uncommon practise, I just want my
server to not get hammered.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I am not young enough to know everything." - Oscar Wilde

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux