From:             xuefer at 21cn dot com
Operating system: winxp/linux
PHP version:      4.3.5RC3
PHP Bug Type:     Apache2 related
Bug description:  flush sometimes don't work

Description:
------------
it works under apache1, but not on apache2

this script is used for network-speed testing



yet, i don't know if it's relative to php or apache



Reproduce code:
---------------
<?php

header("Content-Type: binary");

// while (@ob_clean());

set_time_limit(5); // may be 1

$fp = fopen("/dev/urandom");

$u = fread($fp, 1024 * 1024); // 1mb

while (1) {

        echo $u;

        ob_flush(); flush();

}

?>



Expected result:
----------------
under apache1, each time request to this file will download start from 0%
immediately

tested under IE & Flashget

Actual result:
--------------
but under apache2, 1st time seems ok, cancel IE download or stopped
flashget, then try again(with "Rang" header), download will not start
until script is timedout, then, start with a content-length in response
header

the process of apache2 is taking so much memory about XXmb even 1XXmb

-- 
Edit bug report at http://bugs.php.net/?id=27584&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27584&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27584&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27584&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27584&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27584&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27584&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27584&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27584&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27584&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27584&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27584&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27584&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27584&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27584&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27584&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27584&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27584&r=float

Reply via email to