A "little" late but:
Robin Getz wrote:
If this runs for awhile things go very bad. This seems to be related to
a specific download manager called NetAnts that seems to be popular in
China.
http://www.netants.com/
Which attempts to open the same url for downloading 10-15 times at the
same instan
On Tuesday 04 January 2005 22:04, Robin Getz wrote:
> Jason Wong wrote:
> >Are you using the above code on its own (ie not within some other code
> >that may affect the memory usage)?
>
> Well, herethe entire file (It is pretty short - only a 2 pages, but sorry
> in advance if anyone considers this
Jason Wong wrote:
Are you using the above code on its own (ie not within some other code
that may affect the memory usage)?
Well, herethe entire file (It is pretty short - only a 2 pages, but sorry
in advance if anyone considers this bad form).
site is called with something like
http://blackfin.
On Sunday 02 January 2005 16:43, Robin Getz wrote:
> Rasmus Lerdorf wrote:
> > >>
> > >> $buff = "0";
> > >> while (!feof($fp)) {
> > >>$buff = fread($fp, 4096);
> > >>print $buff;
> > >> }
> > >> unset($buff);
> > >> fclose ($fp);
> > >> ===
Sebastian wrote:
> yea. all the files aren't 100MB though.. some are 2mb (even less) while
> some
> files are over 300MB as well.
> so, does this need to be adjusted depending on the filesize?
I believe that at a certain point, your setting there will be worse for
the system if you make it too big
Rasmus Lerdorf wrote:
>>
>> $buff = "0";
>> while (!feof($fp)) {
>>$buff = fread($fp, 4096);
>>print $buff;
>> }
>> unset($buff);
>> fclose ($fp);
>>
Well, the above code does not use more than 4K of ram plus a bit of
overhead. So
achment; filename="' . $file['type'] . '"');
header('Content-Length: ' . filesize($file['path'] . $file['type']));
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
- Original Message -
From: &quo
Robin Getz wrote:
Robin Getz wrote:
My next experiment is:
$buff = "0";
while (!feof($fp)) {
$buff = fread($fp, 4096);
print $buff;
}
unset($buff);
fclose ($fp);
Nope that doesn't work either - came back, and saw apache processes that
Robin Getz wrote:
My next experiment is:
$buff = "0";
while (!feof($fp)) {
$buff = fread($fp, 4096);
print $buff;
}
unset($buff);
fclose ($fp);
Nope that doesn't work either - came back, and saw apache processes that
were +450Meg. Cha
Curt Zirzow wrote:
* Thus wrote Richard Lynch:
> Sebastian wrote:
> > i'm working on a app which output files with readfile() and some
headers..
> > i read a comment in the manual that says if your outputting a file
> > php will use the same amount of memory as the size of the file. so,
> > if the
* Thus wrote Richard Lynch:
> Sebastian wrote:
> > i'm working on a app which output files with readfile() and some headers..
> > i read a comment in the manual that says if your outputting a file php
> > will
> > use the same amount of memory as the size of the file. so, if the file is
> > 100MB p
gt;
Cc: "Sebastian" <[EMAIL PROTECTED]>;
Sent: Friday, December 31, 2004 10:24 PM
Subject: Re: [PHP] handling large files w/readfile
> I'd go with Richards Basic idea, but if you're outputting a 100Mb file
> I'd use a hell of a lot bigger chunks than 4K. W
I'd go with Richards Basic idea, but if you're outputting a 100Mb file
I'd use a hell of a lot bigger chunks than 4K. With the syscall and
loop overhead, i'd go with at least half a megabyte, or more likely
2Mb depending on your amount of memory.
To do this you'd change Richards
echo fread($fp,
Sebastian wrote:
> i'm working on a app which output files with readfile() and some headers..
> i read a comment in the manual that says if your outputting a file php
> will
> use the same amount of memory as the size of the file. so, if the file is
> 100MB php will use 100MB of memory.. is this tr
Sebastian wrote:
i'm working on a app which output files with readfile() and some headers..
i read a comment in the manual that says if your outputting a file php will
use the same amount of memory as the size of the file. so, if the file is
100MB php will use 100MB of memory.. is this true?
I d
Hello!
> i'm working on a app which output files with readfile() and some headers..
> i read a comment in the manual that says if your outputting a file php
> will
> use the same amount of memory as the size of the file. so, if the file is
> 100MB php will use 100MB of memory.. is this true?
>
> i
16 matches
Mail list logo