mod_php gets disabled during do-release-upgrade

Bug #1865218 reported by Simon Déziel on 2020-02-28
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php-defaults (Ubuntu)
High
Unassigned

Bug Description

Yesterday, when upgrading a client VMs running Xenial and moving to Bionic, I noticed Apache's mod_php was disabled. I later reproduced this in a container:

# create a Xenial container
$ lxc launch images:ubuntu/xenial xa
Creating xa
Starting xa

# Install Apache mod_php
$ lxc shell xa
mesg: ttyname failed: Success

root@xa:~# apt-get install libapache2-mod-php
Reading package lists... Done
Building dependency tree
Reading state information... Done
...
Unpacking libapache2-mod-php7.0 (7.0.33-0ubuntu0.16.04.12) ...
...
apache2_switch_mpm Switch to prefork
apache2_invoke: Enable module php7.0

# Upgrade to Bionic
root@xa:~# apt-get install ubuntu-release-upgrader-core
...

root@xa:~# do-release-upgrade
...
Creating config file /etc/php/7.2/cli/php.ini with new version
Setting up libapache2-mod-php7.2 (7.2.24-0ubuntu0.18.04.3) ...

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-php (1:7.2+60ubuntu1) ...
...
Removing libapache2-mod-php7.0 (7.0.33-0ubuntu0.16.04.12) ...
Module php7.0 disabled.
apache2_invoke prerm: Disable module php7.0
Purging configuration files for libapache2-mod-php7.0 (7.0.33-0ubuntu0.16.04.12) ...
apache2_invoke postrm: Purging state for php7.0
dpkg: warning: while removing libapache2-mod-php7.0, directory '/etc/php/7.0/apache2/conf.d' not empty so not removed
...

System upgrade is complete.

Restart required

To finish the upgrade, a restart is required.
If you select 'y' the system will be restarted.

Continue [yN] y

Additional information on the upgraded container:

root@xa:~# lsb_release -rd
Description: Ubuntu 18.04.4 LTS
Release: 18.04
root@xa:~# apt-cache policy libapache2-mod-php7.2
libapache2-mod-php7.2:
  Installed: 7.2.24-0ubuntu0.18.04.3
  Candidate: 7.2.24-0ubuntu0.18.04.3
  Version table:
 *** 7.2.24-0ubuntu0.18.04.3 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
        100 /var/lib/dpkg/status
     7.2.3-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages

Andreas Hasenack (ahasenack) wrote :

Thanks for the reproduction steps, marking as triaged.

Changed in php-defaults (Ubuntu):
status: New → Triaged
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers