Virtualmin installed php7.2 and broke apache2


Unattended upgrades installed default php version for ubuntu 16.04(php 7.2) this morning and broke web server(apache2) - all php files were not executed but system was sending it download.

I understand that php 7.2 can be not supported, but can You secure system against automatically installing it?



Howdy -- it sounds like the new PHP version has a SetHandler line that is causing problems.

What you can do is run this command:

find /etc/apache2 -type f | xargs grep -i sethandler

The key would be to find the config file for the new PHP version, comment it out, then restart Apache. After you do that, it should fix the problems you were seeing.

Yeah, also(idk why) i had to uninstall php7.2 - but this operations can resolve problem temporarily, but how can i fix this permantently and run full unattended upgrades again?

Personally, I wouldn't do unattended upgrades :-)

Bad things can happen, and I always want to be there during an upgrade to ensure everything is working properly. I have Virtualmin notify me when updates are available, and then I perform the upgrades at my convenience.

If you wish to prevent a package from being installed though, here's a few suggestions for how to go about that described here:

andreychek thanks for your reply ;) it might help for me ATM.

But in my opinion its still important bug if virtualmin allow to set automatic upgrades in panel with 100% chance(on ubuntu 16.04) to broke all sites during upgrade(by installing php 7.2) which need to be fixed ;)