|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23163 connection_aborted() doesn't work
Submitted: 2003-04-11 04:31 UTC Modified: 2003-04-28 11:17 UTC
Avg. Score:4.6 ± 1.0
Reproduced:7 of 7 (100.0%)
Same Version:2 (28.6%)
Same OS:3 (42.9%)
From: lapo at lapo dot it Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 4.3.2RC1 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
42 - 30 = ?
Subscribe to this entry?

 [2003-04-11 04:31 UTC] lapo at lapo dot it
I have a long running script with the following "core"

ignore_user_abort(true); // also tried without
$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

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...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-28 11:17 UTC]
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-07-16 03:35 UTC] 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-08-24 17:09 UTC] 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-08-24 17:14 UTC] dennis at conversis dot de
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).
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Jan 31 01:05:52 2023 UTC