php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42013 flush() does not flush with FastCGI
Submitted: 2007-07-16 22:29 UTC Modified: 2007-07-25 11:31 UTC
Votes:2
Avg. Score:2.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (100.0%)
From: jani@php.net Assigned: dmitry (profile)
Status: Not a bug Package: CGI/CLI related
PHP Version: 5CVS-2007-07-16 (CVS) OS: Linux (FC 6)
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
29 + 20 = ?
Subscribe to this entry?

 
 [2007-07-16 22:29 UTC] jani@php.net
Description:
------------
The following script works with plain CGI setup.
It also works fine with Apache 2.2 module.
It does not work with FastCGI setup.

Regression of ug #34429


Reproduce code:
---------------
<html>
<body>
<?php
for ($i = 1; $i < 6; $i++)
{
  echo " ----------------- $i ----------------<br />\n";
  sleep(1);
  flush();
}
?>
</body>
</html>



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-16 22:29 UTC] jani@php.net
See also bug #34429
 [2007-07-23 09:17 UTC] jani@php.net
Dmitry, can you check this out please? My debugging of it failed miserably.. :(
 [2007-07-25 11:31 UTC] dmitry@php.net
PHP itself works fine. The "strace" of PHP process shows that each line is sent separatly.

write(4, "\1\6\324\224\0r\6\0X-Powered-By: PHP/5.2.4-"..., 128) = 128
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({1, 0}, {1, 0})               = 0
write(4, "\1\6\324\224\0,\4\0 ----------------- 2 ---"..., 56) = 56
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({1, 0}, {1, 0})               = 0
write(4, "\1\6\324\224\0,\4\0 ----------------- 3 ---"..., 56) = 56
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({1, 0}, {1, 0})               = 0
write(4, "\1\6\324\224\0,\4\0 ----------------- 4 ---"..., 56) = 56

The problem may be in Web Browser, Web Server or FastCGI manager.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC