You are here: Re: [PHP] [? BUG ?] weird thing;downloading from a php script stops at exactly 2.000.000 bytes « PHP « IT news, forums, messages
Re: [PHP] [? BUG ?] weird thing;downloading from a php script stops at exactly 2.000.000 bytes

Posted by Catalin Trifu on 09/28/57 11:18

Hi,

There is not a big speed difference between the two.
The only thing is that it was frustrating to find out the limitations
on readfile.
I used it before with large files and it was ok; only to find out now
that on 5.0.4 it doesn't work as it used to.
As php manual states readfile should be the way to spit a file out
the wire.
btw:
$fp = fopen('somefile');
fpassthru($fp);
is also stopping at 2.000.000 bytes, which definetely drives me
to think there is a bug somewhere.


Catalin


Richard Lynch wrote:
> On Thu, June 9, 2005 4:12 pm, Catalin Trifu said:
>
>> Tried it and it works indeed, but it's quite annoying to make such
>>tricks
>>and is not the best solution either; fopen and fread are "expensive".
>> I can't say if it's a bug in PHP or some config option.
>
>
> You may want to benchmark the difference between readfile and fopen/fread
> for a 1.9M file.
>
> If it ain't much, don't worry about it.
>
> One posible work-around:
>
> `cat filename`;
>
> This MIGHT be cheaper than fopen/fread -- Or not, since it has to build a
> shell of some kind, I think.
>
> PS File a bug report, if you haven't already.
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация