#18793 [Opn->Csd]: PHP won't display output until script has finished executing.
| From: | kalowsky@php.net | Date: | Wed, 07 Aug 2002 19:29:53 +0000 |
| Subject: | #18793 [Opn->Csd]: PHP won't display output until script has finished executing. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-16208@lists.php.net to get a copy of this message | ||
ID: 18793
Updated by: kalowsky@php.net
Reported By: davidt@jelly.eng.wayne.edu
-Status: Open
+Status: Closed
Bug Type: Output Control
Operating System: FreeBSD 4.6
PHP Version: 4.2.2
New Comment:
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a
documentation
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-08-07 15:26:55] davidt@jelly.eng.wayne.edu
I am writing a script (from the command prompt) that runs for a very
long time. I need the script to return progress reports (echos) in the
middle of the script. This used to work in PHP 4.2.1 but now that I've
upgraded to PHP 4.2.2, this is no longer working. Now, the script only
returns the output after completing. The code I used is:
<?
echo "Displaying Output\n";
flush();
sleep(5);
?>
In this example, the echo is displayed on my screen only after the
script has completed (5 seconds after it was issued). However, It
shows immediately in 4.2.1.
I've also tried it without the flush() function and it has the same
result.
Any help would be much appreciated.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18793&edit=1