install of libapache2-mod-php5 may not result in enabled php
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apache2 (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
Binary package hint: apache2
On a fresh ec2 instance of maverick i386, I tried:
$ sudo apt-get install libapache2-mod-php5
That went fine, ending with:
| Setting up apache2-mpm-prefork (2.2.15-5ubuntu1) ...
| * Starting web server apache2
| ...done.
| Setting up php5-common (5.3.2-1ubuntu5) ...
| Setting up libapache2-mod-php5 (5.3.2-1ubuntu5) ...
|
| Creating config file /etc/php5/
| * Reloading web server config apache2
| ...done.
| Processing triggers for libc-bin ...
| ldconfig deferred processing now taking place
However, php files were not being processed until a subsequent apache restart (or reload).
I suspect the problem is a race condition in /etc/init.
In this install case, apache is started, and very soon after the configuration is reloaded.
I was able to recreate the failure outside of install by:
$ sudo sh -xc 'service apache2 stop;
sleep 3;
a2dismod php5;
service apache2 start;
a2enmod php5;
service apache2 reload;'
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: apache2.2-common 2.2.15-5ubuntu1
ProcVersionSign
Uname: Linux 2.6.32-305-ec2 i686
Architecture: i386
Date: Thu Jul 8 14:14:22 2010
Ec2AMI: ami-7e5db517
Ec2AMIManifest: ubuntu-
Ec2Availability
Ec2InstanceType: m1.small
Ec2Kernel: aki-078e676e
Ec2Ramdisk: unavailable
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: apache2
affects: | apache2 (Ubuntu) → php5 (Ubuntu) |
affects: | php5 (Ubuntu) → apache2 (Ubuntu) |
Changed in apache2 (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
importance: | Medium → Low |
affects: | apache2 (Ubuntu) → php5 (Ubuntu) |
affects: | php5 (Ubuntu) → apache2 (Ubuntu) |
I was able to repeat the steps, and agree with your assessment that the "reload" signal is getting delivered before the server has even registered its signal handlers.
I set it to medium, because it might expose the php code of an unsuspecting user until they restart the server.
One workaround would be to restart, rather than force-reload, in libapache2- mod-php5. postinst. Since we're changing the server in quite a fundamental way by loading new modules, this is might be a good idea to do on libapache2-mod-*, as it would leave apache in a much cleaner state, at the expense of maybe interrupting a few connections in massive virtual hosting situations.