|
From: <php...@li...> - 2008-03-15 12:54:10
|
Hi,
I was able to reproduce this problem with Apache .2.8 (.2.6 doesn't have this problem).
Since Apache 2.2.8 the PHP MINIT() is called exactly once and the MSHUTDOWN() function is called
more than once, violating the PHP module contract.
In other words: PHP does not work anymore with Apache 2.2.8. Please use some other HTTP server or
some other SAPI, for example FastCGI.
I have the gut feeling that this is a long-time PHP bug; they've probably implemented the wrong
callback. PHP's MSHUTDOWN() shouldn't be called for each child, it should be called when the whole
HTTP server terminates.
A quick workaround is to store the PID in the MINIT() function (see java.c) and ignore any
MSHUTDOWN() where getpid() != pid. Something like this:
In java.c:
int pid;
MINIT()
{
pid = getpid();
...
}
MSHUTDOWN()
{
if (getpid() != pid) return SUCCESS; // work around for a Apache 2.2.8 or PHP bug.
...
}
Note that all PHP modules have the same problem, so I suggest to file a bug report to either the
PHP or the Apache team.
Regards,
Jost Boekemeier
E-Mails jetzt auf Ihrem Handy.
www.yahoo.de/go
|