Re: big downloads discuraged with php?
| From: | Chris | Date: | Tue, 23 May 2006 02:42:02 +0000 |
| Subject: | Re: big downloads discuraged with php? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-236689@lists.php.net to get a copy of this message | ||
Michelle Konzack wrote:
Hello, I have coded a webinterface to a (Debian) pbuilder (i386, amd64, m68k, powerpc, sparc, mips, hppa, ia64 and arm) which can check and backport Debian sources. Now I have some trouble, because some people have tried to let php5 download source tarballs of 30-400 MByte... This let my system smoking!How are you presenting the download? fpassthru for example reads the whole lot into memory and then spits it out. Using a loop like this: while(!feof($fp)) { echo fread($fp, $x); } will only read $x bytes and dump them.
Not that I have no bandwidth (SONET, Dual STM-4) or performance issues (32 CPU's 650MHz, 64 GB memory) but I want to ask you about security issues downloading such big files...Same as with small files I assume ;)
Is it better, to span a shell with wget?You can't push content to me - I have to come and get it. -- Postgresql & php tutorials http://www.designmagick.com/