connection_aborted does not work

From: Date: Thu, 19 Aug 2004 05:15:42 +0000
Subject: connection_aborted does not work
Groups: php.general 
Request: Send a blank email to php-general+get-194227@lists.php.net to get a copy of this message
Today is the first time I've ever used connection_aborted, and it doesn't work. There are some bug reports for it dating back to 2002. I'm using PHP 4.3.2. The following script doesn't do what it's supposed to: <?php HEADER('Content-type: text/plain'); Set_Time_Limit(0); //this you know what gonna do Ignore_User_Abort(True); //this will force the script running at the end $f = fopen("/tmp/aborted.log", "w"); fwrite($f, "Starting...\n"); $count = 0; While(!Connection_Aborted()) { fwrite($f, "$count: Going\n"); $count++; fflush($f); Echo "\n"; //this will save de while Flush(); //Now php will check de connection Echo "My chat...."; Sleep(1); } fwrite($f, "Aborted\n"); fclose($f); ?> I got that script from php.net's manual page for connection_aborted(), and modified it to write out to a log file. "Aborted" never ever gets printed to /tmp/aborted.log. Hope this gets fixed ASAP. - Nolan -- http://www.semanticgap.com/people/sneakin/

« previous php.general (#194227) next »