Bug #2929: connectopn_aborted
| From: | mattias at umc dot se | Date: | Tue, 07 Dec 1999 14:21:40 +0000 |
| Subject: | Bug #2929: connectopn_aborted | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-13491@lists.php.net to get a copy of this message | ||
From: mattias@umc.se
Operating system: FreeBSD
PHP version: 3.0.12
PHP Bug Type: Misbehaving function
Bug description: connectopn_aborted
I can not get the connection_aborted() function to work properly,
without flushing the output buffer a couple of times first.
Snip 1. Reports the connection as aborted if you interrupt the page download with "stop".
Behaves correctly.
<?
ignore_user_abort(1);
for($i=0; $i<7; $i++) {
sleep(1);
echo "$i<BR>";
flush();
}
$fp = fopen("/tmp/conn.txt","a");
if(connection_aborted()) fputs($fp,"** the connection was aborted **\n");
else fputs($fp,"** the connection was OK **\n");
exit;
?>
Snip 2. Says that the connection is OK, even though I've hit the "stop" button on my
browser.
<?
ignore_user_abort(1);
for($i=0; $i<7; $i++) {
sleep(1);
echo "$i<BR>";
// flush();
}
$fp = fopen("/tmp/conn.txt","a");
if(connection_aborted()) fputs($fp,"** the connection was aborted **\n");
else fputs($fp,"** the connection was OK **\n");
exit;
?>