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:

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


Previous Comments:
------------------------------------------------------------------------

[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] [EMAIL PROTECTED]

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] [EMAIL PROTECTED]

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

Reply via email to