At 01:37 07/01/2003, Joseph Tate wrote:
Well, according to my highly technical methods of deduction (fprintf(stderr,
Inside sapi_shutdown);) sapi_shutdown is never called when serving a PHP
request when served using mod4_php under Apache. This is because the
shutdown_wrapper never gets
Well, according to my highly technical methods of deduction (fprintf(stderr,
Inside sapi_shutdown);) sapi_shutdown is never called when serving a PHP
request when served using mod4_php under Apache. This is because the
shutdown_wrapper never gets initialized as a cleanup function. This because
As you can see in bug #15209, the change that introduced this problem was
that we started calling php_request_shutdown() in apache_module_main(),
prior to calling it from php_apache_request_shutdown(). So, the place to
put it is clearly php_apache_request_shutdown(), where it used to be called
That's a bit of an odd way to implement it - are you sure closing the link
explicitly at that point won't interfere with anything? In 4.1 (or
whatever the last version it worked like that was), it was taking advantage
of the fact PHP's resource pool was being destroyed after the link was
There probably is a better way to do it. I just haven't been able to figure
it out. Most Apache modules wait until the logging stage to execute
offline code, but it doesn't seem that at that stage PHP code is still in
memory. Thus there doesn't seem to be a satisfactory way to do this. As
for
Try looking at php_apache_request_shutdown() in mod_php4.c. It's our pool
destructor.
Zeev
At 20:55 30/12/2002, Joseph Tate wrote:
There probably is a better way to do it. I just haven't been able to figure
it out. Most Apache modules wait until the logging stage to execute
offline code, but
That's no good. If I remove the sapi_close stuff, and try to execute the
shutdown functions in php_apache_request_shutdown() all I get is stuff in
the error log listing the leaked memory. The requested function does not
get executed.
Joseph
-Original Message-
From: Zeev Suraski
: Monday, December 30, 2002 2:55 PM
Subject: [PHP-DEV] RE: [PATCH]apache_register_shutdown_function final
version
That's no good. If I remove the sapi_close stuff, and try to execute the
shutdown functions in php_apache_request_shutdown() all I get is stuff in
the error log listing the leaked