#18793 [NEW]: PHP won't display output until script has finished executing.
From: davidt@jelly.eng.wayne.edu
Operating system: FreeBSD 4.6
PHP version: 4.2.2
PHP Bug Type: Output Control
Bug description: PHP won't display output until script has finished executing.
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 bug report at http://bugs.php.net/?id=18793&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18793&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18793&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18793&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18793&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18793&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18793&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18793&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18793&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18793&r=globals
Thread (2 messages)
- davidt at jelly dot eng dot wayne dot edu