|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-02-11 11:21 UTC] mike@php.net
[2009-02-11 13:28 UTC] james82 at gmail dot com
[2009-02-12 11:50 UTC] mike@php.net
[2009-02-12 11:51 UTC] mike@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 21:00:01 2025 UTC |
Description: ------------ If a fatal error occurs in a fastcgi application after we have initialized a request pool and attached a request to it, the request will never be detached from the multi pool. This results in subsequent requests failing with the exception "Could not attach HttpRequest object(#172) to the HttpRequestPool: Invalid easy handle". One way to fix this would be to update pecl_http to properly detach requests from the multi pool when a fatal error is thrown. This could be achieved via a RSHUTDOWN handler, I believe. Reproduce code: --------------- $pool = new HttpRequestPool(); $pool->attach(new HttpRequest("http://localhost")); throw new FatalError("Break pecl_http"); # NOTE: FatalError class does not exist, so above code throws a Fatal error due to the syntax error Expected result: ---------------- The application should throw the following exception every time: "PHP Fatal error: Class 'FatalError' not found" Actual result: -------------- The first time the above application is run via fastcgi, the correct error is thrown: "PHP Fatal error: Class 'FatalError' not found". However, in subsequent requests, a different error is thrown: "HttpRequestPoolException : Could not attach HttpRequest object(#172) to the HttpRequestPool: Invalid easy handle".