Nginx+PHP-FPM - Apache gets installed automatically on PHP update

Bug #1336713 reported by Benjamin Tegge
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Expired
Undecided
Unassigned
php5 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

[Status]

Cannot reproduce. This bug will not make any progress until someone affected can provide exact and detailed steps to reproduce the problem from a fresh Ubuntu Server installation or cloud image.

[Original Description]

This was originally posted as a question. See: https://answers.launchpad.net/ubuntu/+source/php5/+question/250691
---

My 14.04 machine that runs Nginx with PHP-FPM received updates for PHP and somehow Apache was automatically installed.

Here is an excerpt from APT history log:
Install: libapache2-mod-php5:amd64 (5.5.9+dfsg-1ubuntu4.1, automatic), libaprutil1-dbd-sqlite3:amd64 (1.5.3-1, automatic), libaprutil1-ldap:amd64 (1.5.3-1, automatic), apache2-data:amd64 (2.4.7-1ubuntu4, automatic), apache2:amd64 (2.4.7-1ubuntu4, automatic), apache2-bin:amd64 (2.4.7-1ubuntu4, automatic)

Looking at the dependencies for the php5 package I don't understand why this happened:
Depends: libapache2-mod-php5 (>= 5.5.9+dfsg-1ubuntu4.1) | libapache2-mod-php5filter (>= 5.5.9+dfsg-1ubuntu4.1) | php5-cgi (>= 5.5.9+dfsg-1ubuntu4.1) | php5-fpm (>= 5.5.9+dfsg-1ubuntu4.1), php5-common (>= 5.5.9+dfsg-1ubuntu4.1)

With Nginx configured to listen on port 80, this unwanted Apache installation would interfere at startup (this exactly happened sometime ago on an older release). I don't think that this behaviour is correct.

Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

> My 14.04 machine that runs Nginx with PHP-FPM received updates for PHP and somehow Apache was automatically installed.

Please could you expand on this? How exactly did you receive updates?

Once you've explained, please change the bug status back to New. Thanks!

Changed in php5 (Ubuntu):
status: New → Incomplete
Revision history for this message
Benjamin Tegge (livewirebt) wrote :

I ran apt-get update and apt-get dist-upgrade on the machine, the apt history excerpt shows that new packages that got installed during this event. php5-fpm is from the repositories and nginx-extras from https://launchpad.net/~nginx/+archive/development.

Changed in php5 (Ubuntu):
status: Incomplete → New
Revision history for this message
Jacek (Hyacinth) Stypuła (js-ubuntuone) wrote :

I've experienced this bug while upgrading through update-manager (Ubuntu 14.04.2 LTS), here goes the excerpt from APT history log:

Start-Date: 2015-03-19 10:35:14
Commandline: aptdaemon role='role-commit-packages' sender=':1.72'
Install: libapache2-mod-php5:amd64 (5.5.9+dfsg-1ubuntu4.7, automatic), apache2-data:amd64 (2.4.7-1ubuntu4.4, automatic), apache2:amd64 (2.4.7-1ubuntu4.4, automatic), apache2-bin:amd64 (2.4.7-1ubuntu4.4, automatic)
Upgrade: php5-fpm:amd64 (5.5.9+dfsg-1ubuntu4.6, 5.5.9+dfsg-1ubuntu4.7), php5-common:amd64 (5.5.9+dfsg-1ubuntu4.6, 5.5.9+dfsg-1ubuntu4.7), php5-curl:amd64 (5.5.9+dfsg-1ubuntu4.6, 5.5.9+dfsg-1ubuntu4.7), php5-readline:amd64 (5.5.9+dfsg-1ubuntu4.6, 5.5.9+dfsg-1ubuntu4.7), php5:amd64 (5.5.9+dfsg-1ubuntu4.6, 5.5.9+dfsg-1ubuntu4.7), libxfont1:amd64 (1.4.7-1ubuntu0.1, 1.4.7-1ubuntu0.2), php5-cli:amd64 (5.5.9+dfsg-1ubuntu4.6, 5.5.9+dfsg-1ubuntu4.7), php5-mysqlnd:amd64 (5.5.9+dfsg-1ubuntu4.6, 5.5.9+dfsg-1ubuntu4.7), php5-gd:amd64 (5.5.9+dfsg-1ubuntu4.6, 5.5.9+dfsg-1ubuntu4.7)
End-Date: 2015-03-19 10:37:05

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apt (Ubuntu):
status: New → Confirmed
Changed in php5 (Ubuntu):
status: New → Confirmed
tags: added: third-party-packages trusty
Revision history for this message
Thomas Ward (teward) wrote :

Thanks to Brian Murray for the ping on IRC (in #ubuntu-bugs). This is not an nginx PPA problem.

There have been no NGINX package updates in that repository since February 10, 2015. The NGINX PPA also has ***zero dependencies, recommends, or suggests*** on php5-fpm or any other PHP or Apache components. This is not an issue with the third-party packaging of NGINX as done by myself.

This remains an issue unrelated to the third-party-packages.

Revision history for this message
Thomas Ward (teward) wrote :

I've also done some testing in a system with nginx and php5-fpm installed - nginx from the (stable) PPA, and php5-fpm from the repositories, on a Trusty system. This is in a production environment, on a VPS from RamNode, and the php5-fpm and nginx haven't been updated in a while (at least three months).

Attached is a logfile from a dry-run of the `apt-get dist-upgrade --dry-run` and that there are no apache2 packages (other than apache2-utils which I use to generate htpasswd compatible items for nginx, and can exist separately from the apache2 binaries). (This shows it's not an nginx problem, nor does it appear to be a php5 problem, and that this needs to be dug into more deeply to identify potential causes.)

Revision history for this message
Thomas Ward (teward) wrote :

NOTE: I do not have the `php5` metapackage installed on this server - I explicitly installed php5-fpm WITHOUT the `php5` metapackage. I only have the `php5-fpm` package (and related dependencies) installed. Is it at all possible that the `php5` metapackage ignored the dependencies list and therefore installed Apache because it couldn't see that php5-fpm is existing?

Changed in php5 (Ubuntu):
status: Confirmed → Incomplete
Changed in apt (Ubuntu):
status: Confirmed → Incomplete
Robie Basak (racb)
description: updated
Revision history for this message
Thomas Ward (teward) wrote :

Can anyone confirm whether this happens with the `php5` metapackage actually in the 'installed' state prior to the update, or whether this happened with only `php5-fpm` installed?

We also need more steps to reproduce this before we can more thoroughly start examining and testing.

Revision history for this message
Jacek (Hyacinth) Stypuła (js-ubuntuone) wrote :

Today, with `php5` security updates again I have got `apache2` installed as a bonus.

I had `php5` metapackage installed prior to the update, so it may be the culprit.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for php5 (Ubuntu) because there has been no activity for 60 days.]

Changed in php5 (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for apt (Ubuntu) because there has been no activity for 60 days.]

Changed in apt (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.