Edit report at http://bugs.php.net/bug.php?id=47412&edit=1
ID: 47412
Comment by: tser at deltacontrols dot com
Reported by: tser at deltacontrols dot com
Summary: PHP_MSHUTDOWN_FUNCTION not being called under FastCGI
Status: No Feedback
Type: Bug
Package: CGI related
Operating System: win32 only - Vista
PHP Version: 5.2.9RC2
Assigned To: pajoye
New Comment:
I cannot re-open the bug.
There are more info on handling of SignalBeforeTerminateSeconds
Please refer to http://forums.iis.net/t/1167753.aspx
Previous Comments:
------------------------------------------------------------------------
[2010-05-12 02:12:15] tser at deltacontrols dot com
More information.
Using the latest FastCGI update on IIS7 (KB980363) which support
SignalBeforeTerminateSeconds, PHP_MSHUTDOWN_FUNCTION is still not being
called.
Look into the code in sapi/cgi/fastcgi.c
A thread fcgi_shutdown_thread has been created to trap the
"_FCGI_SHUTDOWN_EVENT_"
event but the code simply set in_shutdown to 1. After that,
PHP_MSHUTDOWN_FUNCTION
in the extension code is still not being called.
------------------------------------------------------------------------
[2010-01-12 01:00:01] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2010-01-04 18:52:37] tser at deltacontrols dot com
To answer the question, the values of PHP_FCGI_MAX_REQUESTS and
instanceMaxRequests ar eboth 10000. But they do not come into play to
duplicate this problem. The problem could be duplicated before number of
request reach these numbers.
I will try to explain the detail using just the standard extension
(php_date).
1. Setup PHP FactCGI in IIS. Everything default.
2. Try to run a test.php with this code <?phpinfo();?>
3. Attach the debugger to php_cgi.exe and make sure it loaded the debug
symbol of php_date.
4. Put a break point in PHP_MSHUTDOWN_FUNCTION inside php_date.c
5. Go to IIS Manager, Application Pools. Select DefaultAppPool and click
"Recycle..." on the right hand pane.
6. Notice that the php_cgi.exe will exit but your breakpoint in
php_date.c is not triggered.
------------------------------------------------------------------------
[2010-01-04 14:00:54] pajoye@php.net
It is called as expected (tested on vista/iis and in the console).
If you still experiece this problem, then please provide a detailed way
to reproduce:
- what are you doing exactly in IIS
- values of PHP_FCGI_MAX_REQUESTS and instanceMaxRequests (IIS setting)
------------------------------------------------------------------------
[2009-12-23 02:27:19] pajoye@php.net
Will verify this issue once I'm back from vacation.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=47412--
Edit this bug report at http://bugs.php.net/bug.php?id=47412&edit=1