It looks like the logic in the upgrader flags as an error if there are previous enabled php mods enabled in apache. It's a bit of a hack but for ubuntu I changed the logic to make it disable those other mods; for Ubuntu we always only support a single php version at a time, so this should work for us. I'm not sure this is suitable for Debian since sometimes multiple php versions are supported. However, at least this could point to where a more generalized solution could be developed.
https://bugs.launchpad.net/ubuntu/+source/php7.4/+bug/1865218 On Mon, 19 Mar 2018 15:29:48 +0530 Sunil Mohan Adapa <su...@medhas.org> wrote: > Package: libapache2-mod-php > Version: 1:7.2+60 > Severity: important > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Dear Maintainer, > > When an older version of libapache2-mod-php depending on libapache2-mod-php7.0 > is installed and upgraded to newer version, no php module is enabled. > > One way to reproduce is as follows: first install an older version of > libapache2-mode-php, such as in a fresh install of Debian stretch. This > installs > libapache2-mod-php7.0. Now upgrade to latest libapache2-mod-php, such as by > upgrade to testing. This installs libapache2-mod-php7.2. However, php7.2 > module > is not enabled as php7.0 module is already enabled. After that, during > autoremove, libapache2-mod-php7.0 is removed. Now, php7.0 is not > enabled/installed and php7.2 is not enabled. > > I expect that when libapache2-mod-php is installed, a php apache2 module is > enabled and it stays that way even during upgrade from stable to testing. > Currently, all FreedomBox users on testing are facing this issue due to > dependency on libapache2-mod-php and the use of unattended-upgrades which auto > removes packages. > > For more details, see the following session (full logs are attached): > > # apt install libapache2-mod-php > > Edit /etc/apt/sources.list and s/stretch/testing/g > > # apt update > # apt dist-upgrade > > [...] > Setting up php-common (1:60) ... > [...] > Setting up php7.0-common (7.0.28-1) ... > [...] > Setting up libapache2-mod-php7.2 (7.2.3-1) ... > Package apache2 is not configured yet. Will defer actions by package > libapache2-mod-php7.2. > > Creating config file /etc/php/7.2/apache2/php.ini with new version > libapache2-mod-php7.2: php7.0 module already enabled, not enabling PHP 7.2 > [...] > Setting up libapache2-mod-php7.0 (7.0.28-1) ... > libapache2-mod-php7.0: not switching MPM - already enabled > [...] > > # a2query -m php7.0 > php7.0 (enabled by maintainer script) > # a2query -m php7.2 > No module matches php7.2 > > # apt autoremove > [...] > The following packages will be REMOVED:
signature.asc
Description: PGP signature