#23163 [Com]: connection_aborted() doesn't work
| From: | dennis at conversis dot de | Date: | Sun, 24 Aug 2003 22:14:05 +0000 |
| Subject: | #23163 [Com]: connection_aborted() doesn't work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-46552@lists.php.net to get a copy of this message | ||
ID: 23163
Comment by: dennis at conversis dot de
Reported By: lapo at lapo dot it
Status: No Feedback
Bug Type: Scripting Engine problem
Operating System: Windows 2000
PHP Version: 4.3.2RC1
New Comment:
Sorry, forgot to mention my config:
I'm running Red Hat 7.3 with the standard apache-1.3.27-2 package and a
self-compiled php-4.3.3rc4 (php-4.3.2 didn't work either).
Previous Comments:
------------------------------------------------------------------------
[2003-08-24 17:09:35] dennis at conversis dot de
I encounter the same problem with php-4.3.2 and 4.3.3rc4. Effectively
the connection_* function are broken and I can no longer determine when
the user has aborted the script.
I made an interesting and somewhat weird observation though:
If I use the print or echo command in the while-loop once (!) then the
script will terminate after the loop has run *exactly* three times
after the abort.
If I put more than one print/echo in the loop (2->inf) then the script
will terminate after *exactly* 2 (!) iterations of the loop after the
script has aborted.
The length of the string used in the print/echo statement doesn't seem
to matter.
I hope this helps as this bug is currently a showstopper for the stuff
I'm developing (a PHP Jabber client).
------------------------------------------------------------------------
[2003-07-16 03:35:02] jeff at deluxeportal dot com
I'm having the same problem with PHP 4.3.2 and 4.3.3RC1 as well as the
latest PHP5 snapshot in Windows XP and Windows 2003 Server.
------------------------------------------------------------------------
[2003-04-28 11:17:28] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
------------------------------------------------------------------------
[2003-04-23 03:42:17] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-04-11 04:31:16] lapo at lapo dot it
I have a long running script with the following "core"
set_time_limit(60000);
ignore_user_abort(true); // also tried without
ob_implicit_flush();
$query = mssql_query('SELECT lotsarows') or die('Error.');
while($row = mssql_fetch_array($query)) {
//do things
mssql_query('UPDATE onerow') or die('Error.');
//do things
flush();
if(connection_aborted())
die();
}
But it seems to not stop on user abort.
(I can see the DB is being updated after pressing STOP in the browser)
Using Apache2.0 on Win32 (Win2000) and PHP-4.3.2-RC1
This seems similiar to #2929 but doesn't depend on flush() presence...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23163&edit=1