PDA

View Full Version : Supplying big downloadable files on a webserver (>1gb)


Melchior
14th November 2008, 12:11
Hi there,

I need a solution to supply big files over a webserver. Those should be downloaded auth-protected (login/passwd) over http and php.

Until now I used mod_xsendfile (click (http://tn123.ath.cx/mod_xsendfile/)) with Apache 2.2 to do this. This works like a charm tested with maxsize of 100MB. It's a small extension for apache that get's active by a header-manipulation (via php) after the file was requested by the user...

Now it's necessary to cover files up to 5 GB.

Has somebody experience with those large files? I don't have anyone so it's hard for me to estimate this.

Perhaps it's better to bet on Lighty webserver instead using apache?

thx for help.
melchior

falko
15th November 2008, 14:09
I don't think it's a problem to serve large files with a normal Apache or Lighttpd installation (without any extra modules). When you download a Linux DVD or CD iso file, the isos are also being served by a normal Apache or Lighttpd.

Melchior
17th November 2008, 17:50
hi falko,

thx for reply.
top forum. top support. and top ISPCONFIG. I love it!

My doubts to provide a large file came up that the file gets served dynamic by php.

Some time ago I tried to this to supply a 100MB file.

When I clicked on download the download started extremely delayed. I think this happened because php was loading the whole file in memory before it began to start it.

I tested a workaround I read on php.net to supply the file as chunked file segmemts but it didn't solved the delay at all.

So at all I switched over to use mod_xsendfile for apache. And this works very great.

And that's why I'm so afraid. If mod_xsendfile won't work with files upto 5 gb I'll have no chance to get it work with apache :)

thx and best regards,
marco

falko
18th November 2008, 16:06
If you want to use PHP for processing the download, you can find some classes here: http://www.phpclasses.org/browse/

We're using one of these classes to process our VM downloads, but I don't remember the name or link of the class...