#22789 [Fbk]: echo/print/flush doesn't work while socket open
| From: | pollita@php.net | Date: | Wed, 19 Mar 2003 17:39:47 +0000 |
| Subject: | #22789 [Fbk]: echo/print/flush doesn't work while socket open | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-35947@lists.php.net to get a copy of this message | ||
ID: 22789
Updated by: pollita@php.net
Reported By: dietrich dot ayala at foundstone dot com
Status: Feedback
Bug Type: Output Control
Operating System: windows 2000
PHP Version: 4.3.0
New Comment:
Also describe your file (does it contain lin breaks? are they DOS line
breaks {\r\n}, unix line breaks {\n}, or Mac line breaks {\r}), and
output buffering conditions (The output of phpinfo(); would be most
helpful).
Previous Comments:
------------------------------------------------------------------------
[2003-03-19 11:36:25] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
If the problem persists, please give more information
of your environment, like are you running this under
CGI/CLI/IIS/Apache/etc. ?
------------------------------------------------------------------------
[2003-03-19 11:27:24] dietrich dot ayala at foundstone dot com
In this example, php doesn't flush it's buffer until the after
fclose(); I'm testing w/ a 10mb text file.
<?php
if (($f = fopen($very_large_file, 'r')) != 0) {
while ( !feof($f) ) {
echo fread($f, 4096);
flush();
}
fclose($f);
}
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22789&edit=1