php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20053 apache&suexec&php-cgi&ignore_user_abort -> problem with cancelled connections
Submitted: 2002-10-23 19:40 UTC Modified: 2002-12-08 22:25 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: kamil at kamil dot eisp dot pl Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.4.0-dev OS: linux 2.4.18
Private report: No CVE-ID: None
 [2002-10-23 19:40 UTC] kamil at kamil dot eisp dot pl
Under very specific circumstances, php goes in tight infinite loop eating all cpu after request is cancelled.

Configuration:
php 4.2.3 as cgi
apache 1.3.27
php configured with Action directive, (important) using suexec.

Conditions for problem to occur in script:
1.ignore_user_abort(true)
2.sending any http header
3.sending any body content AFTER http header
4. connection is aborted before all data are sent to client.

Script to reproduce problem:
---- CUT ----
<?
ignore_user_abort(true);
header("X-Whatever: whatever");
?>
whatever
---- CUT ----

Problem doesn't exist with mod_php or php-cgi without suexec.
It appears that after apache has closed connection php is still trying to write output and loops for unknown reason.
I'm not sure if this is fault of php, apache or suexec, but I think it could be fixed in php.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-24 02:42 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip
 [2002-10-24 04:27 UTC] kamil at kamil dot eisp dot pl
Exactly the same behaviour as in 4.2.3 :(
 [2002-10-24 12:26 UTC] sniper@php.net
updated version.

 [2002-12-03 01:12 UTC] shane@php.net
Please try the latest cvs as of today.  Several significant cgi fixes have been commited.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 06:01:35 2024 UTC