Bug #64240 [Opn->Nab]: Output Buffering does not work with Connection Handling
| From: | mike@php.net | Date: | Tue, 30 Jul 2013 19:20:56 +0000 |
| Subject: | Bug #64240 [Opn->Nab]: Output Buffering does not work with Connection Handling | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-180588@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64240&edit=1
ID: 64240
Updated by: mike@php.net
Reported by: nathanb@php.net
Summary: Output Buffering does not work with Connection
Handling
-Status: Open
+Status: Not a bug
Type: Bug
Package: Output Control
Operating System: N/A
PHP Version: 5.4.11
-Assigned To:
+Assigned To: mike
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2013-02-18 21:08:50] nathanb@php.net
Description:
------------
While an output buffer is in place the functions connection_aborted() and
connection_status() will not return proper information. (I have only tested in
apache2)
INSTRUCTIONS ON TEST SCRIPT:
In a terminal run "tail -f /tmp/test.tmp" put script in www accessible directory,
run the script from a browser and within a second or two stop the connection or
close browser. Watch the terminal for actions to take place. (comment out the
ob_start() function to see how it should react)
Test script:
---------------
<?php
ignore_user_abort(true);
ob_flush();
flush();
// Comment this out to see it work properly
ob_start(function ($data, $mode){
return $data;
}, 1);
$i=0;
for($i=0;$i++<200;){
echo "----";
ob_flush();
flush();
if(connection_aborted()){
file_put_contents('/tmp/test.tmp', sprintf("Conn Closed\nLoop itterations:
%s\n\n", $i), FILE_APPEND);
exit;
}
usleep(50000);
}
file_put_contents('/tmp/test.tmp', "Timeout\n\n", FILE_APPEND);
?>
Expected result:
----------------
Conn Closed
Loop itterations: %i
Actual result:
--------------
Timeout
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64240&edit=1