Submitted by Shirehosting on Sun, 01/11/2015 - 18:13 Pro Licensee
Hi
Apache is failing to start after an update.
Output of dpkg -l libapache2-mod-php5
dpkg -l libapache2-mod-php5 Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==================================-=============================-============-========================================================================== rc libapache2-mod-php5 5.4.36-0+deb7u1 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
Thanks
Status:
Active
Comments
Submitted by andreychek on Sun, 01/11/2015 - 20:35 Comment #1
Howdy -- ah, it looks like mod_php is no longer installed.
Did you happen to enable Apache's threaded "worker" mode recently? If the default prefork mode is removed, it will take mod_php with it, and can cause what you're seeing.
We can determine that with this command:
dpkg -l 'apache*'`
If you don't need the Apache worker mode though, the above can be corrected by either reinstalling mod_php, or by commenting out the lines that are causing the syntax error in the Apache config (we can help with how to reinstall mod_php).
Submitted by Shirehosting on Sun, 01/11/2015 - 21:05 Pro Licensee Comment #2
Hi thanks for the response.
This server has just been sitting there running for months I never touch it, as it only has 2 sites on it. (we have 5 other servers pro and gpl running as well). So I don't know other then this stopped working with the last virtualmin update yesterday.
So .If I'm understanding you right,
the mode I use here is FCGId, not mod_php, but if it doesn't cause any security concerns to reinstall mod_php but still use FCGId then I'm happy to do that.
Output of dpkg -l 'apache*
Submitted by andreychek on Sun, 01/11/2015 - 21:13 Comment #3
Yeah it looks like it might just be a matter of re-installing mod_php. You can do that with this command:
apt-get install libapache2-mod-php5
Once you do that, are you then able to start Apache?
Submitted by Shirehosting on Sun, 01/11/2015 - 21:20 Pro Licensee Comment #4
Hi AndrewChek
I reinstalled as requested and now its up and running again.
Thanks for your time as usual.
BTW any ideas why it stopped working ? (just for future reference).
Thanks Michael
Submitted by MattWilcox on Mon, 01/12/2015 - 07:52 Comment #5
That has worked for me too, Apache's back up; I have no idea why the PHP module was uninstalled though, that doesn't make much sense to me :/
Submitted by andreychek on Mon, 01/12/2015 - 10:05 Comment #6
Hmm, that's all very unusual! I'm not sure what might be causing mod_php to be uninstalled.
I can't see any reason why Virtualmin itself would remove that, though I'm do some testing with it, along with other recent Debian/Ubuntu updates, to see if we can reproduce that.
Submitted by MattWilcox on Mon, 01/12/2015 - 10:29 Comment #7
Thanks :) FYI I'm on Debian 7.8, I'm pretty sure the machine started out on 7.7 so I'm not sure if it's recently done an auto update :/
Submitted by Shirehosting on Tue, 01/13/2015 - 06:42 Pro Licensee Comment #8
I'm on Deb 7.7
Submitted by TheULi on Tue, 01/13/2015 - 15:08 Comment #9
Hello, this was a failure of updating apache thru webmin.
/var/log/apt/history.log ...
Start-Date: 2015-01-10 21:58:19
Commandline: apt-get -y install apache2
Install: apache2-mpm-itk:amd64 (2.2.22-13+deb7u4, automatic)
Upgrade: apache2:amd64 (2.2.22-13+deb7u3, 2.2.22-13+deb7u4), apache2.2-common:amd64 (2.2.22-13+deb7u3, 2.2.22-13+deb7u4), apache2.2-bin:amd64 (2.2.22-13+deb7u3, 2.2.22-13+deb7u4)
Remove: libapache2-mod-php5:amd64 (5.4.36-0+deb7u1), apache2-mpm-prefork:amd64 (2.2.22-13+deb7u3)
End-Date: 2015-01-10 21:58:58
it removes libapache2-mod-php5 but did not install it again.
Regards. Ulrich
We're confirming this bug with Virtualmin 4.18.gpl
Manually reinstalling "libapache2-mod-php5" package fixed that bug. Thanks to AndrewChek and Ulrich/TheULi for the tip :)
Steps to reproduce that bug
Using
Below is an extract from Virtualmin message. Notice that "libapache2-mod-php5" is automatically removed while updating to Apache 2.2 thru Virtualmin. And not automatically install again.
Below is the full first part of Virtualmin message
Error message when starting Apache 2.2
Submitted by Shirehosting on Tue, 08/18/2015 - 10:25 Pro Licensee Comment #11
Hi Guys
This is still happening with apache updates (2 times in the last month). Will this be looked at or are we doomed to reinstall mod_php each time ?
Thanks Michael
Submitted by andreychek on Tue, 08/18/2015 - 10:32 Comment #12
Sorry for the delay, I'm talking to Jamie about how best we can address that issue.
Submitted by MattWilcox on Tue, 08/18/2015 - 10:46 Comment #13
Thanks for looking into this - I had such a panic when I got hit by this again a few weeks ago, and I'd forgotten what the problem was. Turned out to be the same thing when I eventually stumbled on this post again.
I've now documented the problem in my wiki so I can at least remember to try re-installing libapache2-mod-php5 if it happens again.
Thanks for investigating andreychek and Jamie :)
Subscribed