php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37129 ignore_user_abort not working
Submitted: 2006-04-18 21:21 UTC Modified: 2006-04-18 22:36 UTC
From: devrjason at gmail dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.1.2 OS: Windows_NT
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: devrjason at gmail dot com
New email:
PHP Version: OS:

 

 [2006-04-18 21:21 UTC] devrjason at gmail dot com
Description:
------------
Looks like bug #17265 broke again, but I was unable to add a comment to it since it's closed. This code doesn't stop running when the page is aborted.

Reproduce code:
---------------
$mcon = mysql_connect("localhost", "root", "*****")
	or die("mysql connect failed");

while (1) {
	sleep(3);
	$status = connection_status();
	@mysql_query("insert into test.tests set charv='Connection status: $status'",$mcon);
	$status = connection_aborted();
	@mysql_query("insert into test.tests set charv='Connection aborted: $status'",$mcon);
}

Expected result:
----------------
No more entries after script is aborted.

Actual result:
--------------
Script continues making entries until it times out.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-18 21:24 UTC] tony2001@php.net
PHP knows that the connectio was aborted only if it tries to write something to the buffer and fails.
If you don't write anything to the buffer/screen - there is no way for PHP to know that.
 [2006-04-18 22:36 UTC] devrjason at gmail dot com
PHP generally runs on the same machine as the webserver is running. It knows the remote host, why can't it pole TCP connections and figure out when the remote host no longer exists in the list?

Perhaps that sounds a bit outlandish, but I find it quite ridiculous that web servers can't tell CGIs little important details like that, since the CGI runs on the same machine. Grrr...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 02 01:01:29 2024 UTC