[php-maint] Bug#589386: Bug#589386: libapache2-mod-php5 should probably restart instead of force-reload in postinst

Stefan Fritsch sf at debian.org
Sun Aug 29 13:23:34 UTC 2010


On Sunday 18 July 2010, you wrote:
> I don't think this should be addressed on php5's side. The bug,
> IMO, is  somewhere in apache (at whatever level you may want to
> address it: the init script, apache2ctl, or apache2) as it appears
> that it attempts to deliver a signal when the signal handler may
> not be set.
> 
> Forcing a restart causes service interruptions, which I'm not very
> keen on.

This is not fixable on apache side. During normal startup, apache2 
will parse the configuration and load the modules twice. To save some 
work, mod_php does not initialize itself until it is loaded the second 
time. So if apache2 is started without mod_php loaded, and then 
mod_php is loaded with a graceful reload mod_php thinks it is still in 
the startup phase and does not initialize itself. After a second 
graceful reload, mod_php initializes itself and works ok.

So the simple remedy is that you have to do a hard restart when mod-
php is installed for the first time. When libapache2-mod-php5 is 
upgraded, a graceful reload is sufficient. IMHO this change should go 
into squeeze.

In the long run, mod_php should probably be fixed so that it 
initializes itself if it is loaded for the first time during a 
graceful reload.

Cheers,
Stefan





More information about the pkg-php-maint mailing list