Installing libapache2-mod-php7.0 doesn't enable PHP module

Bug #1689646 reported by Simon Déziel on 2017-05-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php7.0 (Ubuntu)
Nish Aravamudan

Bug Description


 * When a user installs libapache2-mod-php7.0, they expect to have a working apache2 + php installation. Currently that is not the case, because the dependency is only on apache2-bin rather than on apache2.
 * Users probably haven't seen this very commonly, because most guides suggest installing php and apache2.

[Test Case]

 * Install libapache2-mod-php7.0. apache2 should also be installed (and subsequently running by default) after installation.

[Regression Potential]

 * This changes the dependencies of libapache2-mod-php7.0 only. I don't believe there is any regression potential here, as if a user installed libapache2-mod-php7.0 and actually intended to use it, they would have installed apache2 manually.


Steps to reproduce (on Xenial):

1) install libapache2-mod-php7.0 (note the warning/error)
  apt install libapache2-mod-php7.0
Setting up libapache2-mod-php7.0 (7.0.15-0ubuntu0.16.04.4) ...
Warning: Could not load Apache 2.4 maintainer script helper.

2) apache isn't even running
  ps aux| grep apache # returns nothing

3) the apache2 packages was not pulled in, only apache2-bin
  dpkg -l| grep -w apache2

On Trusty, "apt install libapache2-mod-php5" was our way to setup PHP and have the MPM prefork enabled. I'm not sure if that was the wrong way and it worked by accident but this behavior change broke our tooling.

Additional information:

# lsb_release -rd
Description: Ubuntu 16.04.2 LTS
Release: 16.04
# apt-cache policy libapache2-mod-php7.0 apache2-bin
  Installed: 7.0.15-0ubuntu0.16.04.4
  Candidate: 7.0.15-0ubuntu0.16.04.4
  Version table:
 *** 7.0.15-0ubuntu0.16.04.4 500
        500 xenial-updates/main amd64 Packages
        500 xenial-security/main amd64 Packages
        100 /var/lib/dpkg/status
     7.0.4-7ubuntu2 500
        500 xenial/main amd64 Packages
  Installed: 2.4.18-2ubuntu3.1
  Candidate: 2.4.18-2ubuntu3.1
  Version table:
 *** 2.4.18-2ubuntu3.1 500
        500 xenial-updates/main amd64 Packages
        500 xenial-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.4.18-2ubuntu3 500
        500 xenial/main amd64 Packages

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: libapache2-mod-php7.0 7.0.15-0ubuntu0.16.04.4
ProcVersionSignature: Ubuntu 4.4.0-78.99-generic 4.4.62
Uname: Linux 4.4.0-78-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
Date: Tue May 9 19:58:26 2017
 PATH=(custom, no user)
SourcePackage: php7.0
UpgradeStatus: No upgrade log present (probably fresh install)

Simon Déziel (sdeziel) wrote :
Simon Déziel (sdeziel) wrote :

libapache2-mod-php5 used to pull apache2 as well as apache2-bin but if I check libapache2-mod-passenger it never pulled apache2 so I am inclined to think I was using it the wrong way. I'd like a confirmation if possible.

Nish Aravamudan (nacc) wrote :

php7.0 is not in 17.10 (moved to php7.1). It was fixed in Debian in 7.0.8-3.

Backporting the fix to 16.04 in the SRU we are currently doing to 7.0.18.

Changed in php7.0 (Ubuntu Zesty):
status: New → Fix Released
Changed in php7.0 (Ubuntu Xenial):
status: New → Triaged
assignee: nobody → Nish Aravamudan (nacc)
Changed in php7.0 (Ubuntu):
status: New → Invalid
Changed in php7.0 (Ubuntu Yakkety):
status: New → Fix Released
Nish Aravamudan (nacc) on 2017-05-10
Changed in php7.0 (Ubuntu Xenial):
status: Triaged → In Progress
description: updated
Nish Aravamudan (nacc) wrote :

Both Y and Z were based on versions after 7.0.8-3.

Nish Aravamudan (nacc) wrote :

Thanks for noticing this Simon, and sorry about that!

Simon Déziel (sdeziel) wrote :

Nice, thanks for the quick turnaround.

Hello Simon, or anyone else affected,

Accepted php7.0 into xenial-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at . Thank you in advance!

Changed in php7.0 (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Nish Aravamudan (nacc) wrote :

Installed in libapache2-mod-php7.0 without -proposed enabled. apache2 is not installed/started.

Upgraded to the version from -proposed and:

# systemctl status apache2
   Active: active (running) since Fri 2017-05-12 16:42:36 UTC; 31s ago

# apt policy libapache2-mod-php7.0
  Installed: 7.0.18-0ubuntu0.16.04.1
  Candidate: 7.0.18-0ubuntu0.16.04.1
  Version table:
 *** 7.0.18-0ubuntu0.16.04.1 500
        500 xenial-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     7.0.15-0ubuntu0.16.04.4 500
        500 xenial-updates/main amd64 Packages
        500 xenial-security/main amd64 Packages
     7.0.4-7ubuntu2 500
        500 xenial/main amd64 Packages

Marking as verification-done.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package php7.0 - 7.0.18-0ubuntu0.16.04.1

php7.0 (7.0.18-0ubuntu0.16.04.1) xenial; urgency=medium

  * New upstream release 7.0.18
    - LP: #1686237
    - LP: #1674892
    - Refresh patches for new upstream release
  * Drop:
    - debian/patches/0053-Fix-pdo_pgsql.patch: Fixed #73959 - lastInsertId
      fails to throw an exception in pdsql. Thanks to andrewnester
      <email address hidden>. Closes LP #1658289.
      [ Fixed upstream in 7.0.16, prior changelog referred to wrong
        patchfile ]
    - SECURITY REGRESSION: large mysql requests broken (LP #1668017)
      + debian/patches/fix_74021.patch: fix fetch_array with more than
        MEDIUMBLOB in ext/mysqlnd/mysqlnd_wireprotocol.c, added tests to
        ext/mysqli/tests/bug73800.phpt, ext/mysqli/tests/bug74021.phpt.
      [ Fixed upstream in 7.0.17 ]
  * d/control{,.in}: Backport "libapache2-mod-phpX.Y now recommends
    apache2 package (as this is what most people want anyway)" from
    Debian 8.0.7-3 (LP: #1689646).

 -- Nishanth Aravamudan <email address hidden> Wed, 10 May 2017 09:19:03 -0700

Changed in php7.0 (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for php7.0 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers