ID:               36455
 Updated by:       [EMAIL PROTECTED]
 Reported By:      haleden at colorado dot edu
-Status:           Open
+Status:           Feedback
 Bug Type:         Apache related
 Operating System: redhat 7
 PHP Version:      5.1.2
 New Comment:

Works perfectly fine for me and N millions of PHP users.
Apache 1.3.27 is very old, try to upgrade it first.
And decribe in details what exactly did you do to reproduce it.


Previous Comments:
------------------------------------------------------------------------

[2006-02-19 21:03:48] haleden at colorado dot edu

oops, forgot to say that the changes go in:

sapi/apache/mod_php5.c

...
int php_apache_shutdown_wrapper(void)
{
    apache_php_initialized = 0;
    /*  apache_sapi_module.shutdown(&apache_sapi_module);*/
    php_apache_request_shutdown(&apache_sapi_module);
...

------------------------------------------------------------------------

[2006-02-19 20:54:47] haleden at colorado dot edu

Description:
------------
there are a bunch of reports out there that have been 
labeled "bogus" that i bet were not.

i began to have problems starting apache 1.3.27 reliably 
after installing the php module.

i found that if i commented out the php module, apache would 
start. then, if i went in and uncommented the php module, 
and did a apachectl restart, things were fine.

i finally got some time to dig deeper, and ran it under gdb 
and found that it was crashing in a deep stack of nested 
calls to php_apache_shutdown_wrapper.

looking at the source, i see that 
php_apache_shutdown_wrapper calls 
apache_sapi_module.shutdown which is defined to be 
php_apache_shutdown_wrapper. i suspect that at one time 
apache_sapi_module.shutdown pointed to 
php_apache_request_shutdown and things worked until someone 
decided that the wrapper should be called but forgot to 
change the wrapper to call php_apache_request_shutdown.

as to why it was happening at startup, i conjecture that 
apache keeps track of modules in some way and if a module 
didn't shutdown cleanly before, it calls the shutdown hook 
to clean up before starting again. by starting it without 
the module, that check was cleared, and it would not run the 
shutdown hook the next time.

i'm not an expert at all of this stuff, but i made the 
change to the wrapper and it seems to work--further testing 
and sanity checking advised.

thanks,

hal


Reproduce code:
---------------
see above description for apache config changes

Expected result:
----------------
apache starts sucessfully each time when php module defined

Actual result:
--------------
apache doesn't always start successfully when php module 
defined


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=36455&edit=1

Reply via email to