ID: 34429
Updated by: [EMAIL PROTECTED]
Reported By: zimage at icdsoft dot com
Status: Open
-Bug Type: Output Control
+Bug Type: CGI related
-Operating System: Linux
+Operating System: *
-PHP Version: 4.4.0
+PHP Version: 5CVS, 4CVS (2005-09-12)
New Comment:
Writing such things using PHP is pretty useless IMO, but if it works
with other SAPIs..
Previous Comments:
------------------------------------------------------------------------
[2005-09-12 15:47:25] zimage at icdsoft dot com
This is how you could write a chat client for example. Connection is
kept open for the duration of chat session and php script is looping
over the client and server messages.
------------------------------------------------------------------------
[2005-09-10 22:56:11] [EMAIL PROTECTED]
How would it be useful to be able to turn it off?
------------------------------------------------------------------------
[2005-09-09 11:25:26] zimage at icdsoft dot com
And strace of php process looks like:
read(4, "<?php\n\tfor ($i=0; $i<4; $i++){\n\t"..., 8192) = 65
read(4, "", 4096) = 0
read(4, "", 8192) = 0
close(4) = 0
munmap(0x4056b000, 4096) = 0
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
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
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
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
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) =
0
write(3, "[EMAIL PROTECTED]: text/html\r"..., 96) = 96
I.e. there are 4 calls to sleep and the script output is writen at
once. Any
pointers to documentation or further tests that I should perform are
welcome.
------------------------------------------------------------------------
[2005-09-08 21:23:38] zimage at icdsoft dot com
Just tried with php5-200509081630:
PHP 5.1.0-dev (cgi-fcgi) (built: Sep 8 2005 15:09:53)
No luck either. Output still comes at once.
Tried with apache2 + php-4.3.11 - the problem is present there too.
------------------------------------------------------------------------
[2005-09-08 17:30:22] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/34429
--
Edit this bug report at http://bugs.php.net/?id=34429&edit=1