Re: [PHP] How to count transfered kBytes in File-Download

2009-01-05 Thread ceo
> When mentioning the RAM usage problem, one might consider calling > flush() after each echo, just to make sure that they don't run over > PHPs memory limit. Oh yeah. Make sure you've run through and cleared all ob_buffers for any kind of non-HTML output, specifically for file downloads.

Re: [PHP] How to count transfered kBytes in File-Download

2009-01-05 Thread Jim Lucas
c...@l-i-e.com wrote: >> echo fread($HANDLER, $FSIZE); > > This is your problem child right here... > > Sucking in an entire OGG File to RAM, for a large OGG file, will be quite > painful. > > And, on a busy server, even moderate size files will be problematic. > > You could probably relie

Re: [PHP] How to count transfered kBytes in File-Download

2009-01-05 Thread ceo
> echo fread($HANDLER, $FSIZE); This is your problem child right here... Sucking in an entire OGG File to RAM, for a large OGG file, will be quite painful. And, on a busy server, even moderate size files will be problematic. You could probably relieve a lot of stress and keep full

Re: [PHP] How to count transfered kBytes in File-Download

2009-01-02 Thread Jim Lucas
Michelle Konzack wrote: Hello *, currently I have a function: [ '/usr/share/tdphp-vserver/includes/02_functions.inc' ] function fncPushBinary($type='show', $file, $mime='') { Outside your function, or in, I don't care, define a variable/constant that will be used as a buffer

[PHP] How to count transfered kBytes in File-Download

2009-01-02 Thread Michelle Konzack
Hello *, currently I have a function: [ '/usr/share/tdphp-vserver/includes/02_functions.inc' ] function fncPushBinary($type='show', $file, $mime='') { if ( is_file("$file") ) { if ($mime == '') { $mime=exec("file -i -b $file"); } $STRG="; filename=\"" . basena