#26547 [Bgs->Opn]: echo doesn't show until php finished (in DOS mode)

From: Date: Sun, 07 Dec 2003 15:19:46 +0000
Subject: #26547 [Bgs->Opn]: echo doesn't show until php finished (in DOS mode)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-51771@lists.php.net to get a copy of this message
ID: 26547 User updated by: mycia at pchome dot com dot tw Reported By: mycia at pchome dot com dot tw -Status: Bogus +Status: Open Bug Type: Output Control Operating System: Windows 2000 Pro PHP Version: 4.3.4 New Comment: I use CLI version, but the result is the SAME !!!!!!!!! C:\php-4.3.4-Win32>cli\php -v PHP 4.3.4 (cli) (built: Nov 2 2003 23:47:34) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies same in CLI version of PHP 5.0.0b2 Previous Comments: ------------------------------------------------------------------------ [2003-12-07 09:53:29] derick@php.net You should use the CLI version (Command Line Interface) if you want to use PHP on the commandline, and not the CGI-FASTCGI version. Not a bug -> bogus. ------------------------------------------------------------------------ [2003-12-07 09:51:19] mycia at pchome dot com dot tw C:\php>php -v PHP 4.3.4 (cgi-fcgi) (built: Nov 2 2003 23:47:22) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies btw, I tested PHP 5.0.0b2, the same problem exists PHP 5.0.0b2 (cgi-fcgi) (built: Oct 30 2003 12:37:18) Copyright (c) 1997-2003 The PHP Group Zend Engine v2.0.0-dev, Copyright (c) 1998-2003 Zend Technologies ------------------------------------------------------------------------ [2003-12-07 09:02:32] derick@php.net please add the output of: c:\php\php.exe -v ------------------------------------------------------------------------ [2003-12-07 08:58:50] mycia at pchome dot com dot tw Description: ------------ under Windows 2000 Pro DOS mode I use c:\php\php.exe -f c:\php\test.php to 'echo' one word for every second but nothing shown until the end of the execution I tested it in PHP 4.3.4 & 4.2.3 (Windows version) however, it works fine in PHP 4.1.2 (Windows version) ps: I didn't use any output control function Reproduce code: --------------- <?php //I didn't use output control like ob_start() //in PHP 4.3.4 & 4.2.3, I can't see each line for every second (doesn't happen in PHP 4.1.2) for($i=0;$i<5;$i++) { echo $i."\n"; flush(); //doesn't make any difference with or without this line sleep(1); } //all outputs are shown together at the end of the execution ?> Expected result: ---------------- it is expected to see each word every one second Actual result: -------------- nothing shown during the execution all results are shown together at the end of the execution ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26547&edit=1

« previous php.bugs (#51771) next »