|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-28 11:31 UTC] scottmac@php.net
[2007-08-28 11:46 UTC] jani@php.net
[2007-08-31 12:18 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 15:00:01 2025 UTC |
Description: ------------ The CGI SAPI initializes extensions through the regular MINIT/RINIT functions, but lacks a call to php_request_shutdown() for proper extension shutdown on some command line options. This is the case for command line options -v, -i and -m, which call exit(0) without requesting module/extension shutdown first. The CLI SAPI *does* clean up nicely after -v/-i/-m and does not exhibit this behavior. Reproduce code: --------------- With CGI SAPI: # php-cgi -v PHP 5.2.4RC3 (cgi-fcgi) (built: Aug 27 2007 16:51:33) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies with eAccelerator v0.9.6-dev, Copyright (c) 2004-2007 eAccelerator, by eAccelerator [23661] EACCELERATOR: PHP unclean shutdown With CLI SAPI: # php -v PHP 5.2.4RC3 (cli) (built: Aug 27 2007 16:51:49) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies with eAccelerator v0.9.6-dev, Copyright (c) 2004-2007 eAccelerator, by eAccelerator Expected result: ---------------- nice clean shutdown through RSHUTDOWN/MSHUTDOWN. Actual result: -------------- exit(0) without shutting down modules/extensions