Re: Downloading Large (100M+) Files
| From: | Curt Zirzow | Date: | Thu, 04 Nov 2004 23:44:11 +0000 |
| Subject: | Re: Downloading Large (100M+) Files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-201239@lists.php.net to get a copy of this message | ||
* Thus wrote Robin Getz:
> Curt Zirzow [php-general@zirzow.dyndns.org] wrote:
> >> replaced:
> >> readfile($name);
> >> with:
> >> $fp = fopen($name, 'rb');
> >> fpassthru($fp);
> >
> >The only difference between readfile() and fpassthru() is what parameters
> >you pass it.
> >
> >Something else is the problem, what version of php are you running?
>
> I am using php 4.2.2
Thats an awful old version.
>
> OK - I lied.
>
> The same problem exists with fpassthru (now that I have let it run a little
> longer) I now have 5 sleeping httpd processes on my system that are
> consuming 200Meg each.
Either upgrade to a newer version or you could use this function:
http://php.net/apache-child-terminate
Curt
--
Quoth the Raven, "Nevermore."