VirtualMin: Vorsicht beim Apache2 Update ! PHP läuft nach dem Update nicht ohne manuelle Korrektur

Wenn Sie das Tool "VirtualMin" (aka "WebMin") benutzen, um Ihren WebServer zu kontrollieren und administrieren, werden Sie nach den Updates Ihres Apache-WebServers bzw. von PHP teilweise böse Überraschungen erleben: Die PHP Scripte werden nicht mehr ausgeführt, sondern den Besuchern zum Download angeboten. Das ist ein katastrophaler Fehler in den Updates der Software ! Auszug des Apache-Updates:

Installing package(s) with command apt-get -y install apache2 ..

Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  apache2-mpm-worker apache2.2-bin apache2.2-common
Suggested packages:
  www-browser
The following packages will be upgraded:
  apache2 apache2-mpm-worker apache2.2-bin apache2.2-common
4 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
Need to get 1742 kB of archives.
After this operation, 328 kB disk space will be freed.
Get:1 http://security.debian.org/ squeeze/updates/main apache2 amd64 2.2.16-6+squeeze11 [1400 B]
Get:2 http://security.debian.org/ squeeze/updates/main apache2-mpm-worker amd64 2.2.16-6+squeeze11 [2224 B]
Get:3 http://security.debian.org/ squeeze/updates/main apache2.2-common amd64 2.2.16-6+squeeze11 [302 kB]
Get:4 http://security.debian.org/ squeeze/updates/main apache2.2-bin amd64 2.2.16-6+squeeze11 [1436 kB]
Reading changelogs...
Fetched 1742 kB in 0s (5059 kB/s)
(Reading database ... 96060 files and directories currently installed.)
Preparing to replace apache2 2.2.16-6+squeeze10 (using .../apache2_2.2.16-6+squeeze11_amd64.deb) ...
Unpacking replacement apache2 ...
Preparing to replace apache2-mpm-worker 2.2.16-6+squeeze10 (using .../apache2-mpm-worker_2.2.16-6+squeeze11_amd64.deb) ...
Stopping web server: apache2 ... waiting ....
Unpacking replacement apache2-mpm-worker ...
Preparing to replace apache2.2-common 2.2.16-6+squeeze10 (using .../apache2.2-common_2.2.16-6+squeeze11_amd64.deb) ...
Unpacking replacement apache2.2-common ...
Preparing to replace apache2.2-bin 2.2.16-6+squeeze10 (using .../apache2.2-bin_2.2.16-6+squeeze11_amd64.deb) ...
Unpacking replacement apache2.2-bin ...
Processing triggers for man-db ...
Setting up apache2.2-bin (2.2.16-6+squeeze11) ...
Setting up apache2.2-common (2.2.16-6+squeeze11) ...
Setting up apache2-mpm-worker (2.2.16-6+squeeze11) ...
Starting web server: apache2.
Setting up apache2 (2.2.16-6+squeeze11) ...

.. install complete.
Soweit ist noch alles ok - "apache2-mpm-worker" wurde erkannt und aktualisiert. Aber dann kommt das PHP5 Update:
Installing package(s) with command apt-get -y install php5 ..

Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  apache2-mpm-prefork libapache2-mod-php5 php5-cgi php5-cli php5-common
  php5-curl php5-gd php5-imap php5-ldap php5-mcrypt php5-mysql
The following packages will be REMOVED:
  apache2-mpm-worker
The following NEW packages will be installed:
  apache2-mpm-prefork libapache2-mod-php5
The following packages will be upgraded:
  php5 php5-cgi php5-cli php5-common php5-curl php5-gd php5-imap php5-ldap
  php5-mcrypt php5-mysql
10 upgraded, 2 newly installed, 1 to remove and 5 not upgraded.
Need to get 12.6 MB of archives.
After this operation, 8475 kB of additional disk space will be used.
Get:1 http://security.debian.org/ squeeze/updates/main apache2-mpm-prefork amd64 2.2.16-6+squeeze11 [2284 B]
Get:2 http://security.debian.org/ squeeze/updates/main php5-cli amd64 5.3.3-7+squeeze15 [2944 kB]
[...]
Get:11 http://security.debian.org/ squeeze/updates/main libapache2-mod-php5 amd64 5.3.3-7+squeeze15 [3038 kB]
Get:12 http://security.debian.org/ squeeze/updates/main php5 all 5.3.3-7+squeeze15 [1058 B]
Reading changelogs...
Fetched 12.6 MB in 1s (9296 kB/s)
dpkg: apache2-mpm-worker: dependency problems, but removing anyway as you requested:
 apache2 depends on apache2-mpm-worker (= 2.2.16-6+squeeze11) | apache2-mpm-prefork (= 2.2.16-6+squeeze11) | apache2-mpm-event (= 2.2.16-6+squeeze11) | apache2-mpm-itk (= 2.2.16-6+squeeze11); however:
  Package apache2-mpm-worker is to be removed.
  Package apache2-mpm-prefork is not installed.
  Package apache2-mpm-event is not installed.
  Package apache2-mpm-itk is not installed.
(Reading database ... 96057 files and directories currently installed.)
Removing apache2-mpm-worker ...
Stopping web server: apache2 ... waiting ..
Selecting previously deselected package apache2-mpm-prefork.
(Reading database ... 96055 files and directories currently installed.)
Unpacking apache2-mpm-prefork (from .../apache2-mpm-prefork_2.2.16-6+squeeze11_amd64.deb) ...
Setting up apache2-mpm-prefork (2.2.16-6+squeeze11) ...
Starting web server: apache2.
(Reading database ... 96060 files and directories currently installed.)
Preparing to replace php5-cli 5.3.3-7+squeeze14 (using .../php5-cli_5.3.3-7+squeeze15_amd64.deb) ...
Unpacking replacement php5-cli ...
[...]
Preparing to replace php5-common 5.3.3-7+squeeze14 (using .../php5-common_5.3.3-7+squeeze15_amd64.deb) ...
Unpacking replacement php5-common ...
Selecting previously deselected package libapache2-mod-php5.
Unpacking libapache2-mod-php5 (from .../libapache2-mod-php5_5.3.3-7+squeeze15_amd64.deb) ...
Preparing to replace php5 5.3.3-7+squeeze14 (using .../php5_5.3.3-7+squeeze15_all.deb) ...
Unpacking replacement php5 ...
Processing triggers for man-db ...
Setting up php5-common (5.3.3-7+squeeze15) ...
Setting up php5-cli (5.3.3-7+squeeze15) ...
Setting up php5-cgi (5.3.3-7+squeeze15) ...
Setting up libapache2-mod-php5 (5.3.3-7+squeeze15) ...
Reloading web server config: apache2.
Setting up php5 (5.3.3-7+squeeze15) ...

.. install complete.
Im letzten Log finden Sie die Ursache: Der "apache2-mpm-worker" wird deinstalliert (Zeile 10) und der "apache2-mpm-prefork" wird installiert. Das ist falsch und führt zum o.a. Problem. Führen Sie daher Apache2/PHP Updates immer nur manuell aus und geben Sie in einer Shell (= Terminalsession, z.Bsp. per "PuTTY" oder "SSH") den folgenden Befehl ein:
apt-get install apache2-mpm-worker
Dadurch wird Apache wieder in der richtigen Modus versetzt:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  apache2-mpm-prefork libapache2-mod-php5
The following NEW packages will be installed:
  apache2-mpm-worker
0 upgraded, 1 newly installed, 2 to remove and 4 not upgraded.
Need to get 0 B/2224 B of archives.
After this operation, 8475 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 96061 files and directories currently installed.)
Removing libapache2-mod-php5 ...
Module php5 disabled.
Run '/etc/init.d/apache2 restart' to activate new configuration!
dpkg: apache2-mpm-prefork: dependency problems, but removing anyway as you requested:
 apache2 depends on apache2-mpm-worker (= 2.2.16-6+squeeze11) | apache2-mpm-prefork (= 2.2.16-6+squeeze11) | apache2-mpm-event (= 2.2.16-6+squeeze11) | apache2-mpm-itk (= 2.2.16-6+squeeze11); however:
  Package apache2-mpm-worker is not installed.
  Package apache2-mpm-prefork is to be removed.
  Package apache2-mpm-event is not installed.
  Package apache2-mpm-itk is not installed.
Removing apache2-mpm-prefork ...
Stopping web server: apache2 ... waiting .
Selecting previously deselected package apache2-mpm-worker.
(Reading database ... 96055 files and directories currently installed.)
Unpacking apache2-mpm-worker (from .../apache2-mpm-worker_2.2.16-6+squeeze11_amd64.deb) ...
Setting up apache2-mpm-worker (2.2.16-6+squeeze11) ...
Starting web server: apache2.
Hier muss in VirtualMin dringend nachgebessert werden. Die Updateroutinen müssen prüfen, welche Einstellungen und Apache/PHP5 Module laufen und diese bewahren. Nichts ist auf einem Webserver wichtiger als laufende Webseiten und (in fast allen Fällen) PHP.