libapache2-mod-php5 postinst script does not enable module

Bug #953081 reported by James Page
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php5 (Debian)
Fix Released
Unknown
php5 (Ubuntu)
Medium
James Page
Precise
Medium
James Page

Bug Description

The postinst maintainer script for libapache2-mod-php5 correctly enabled the php5 apache module; however the reload_apache function does a force-reload:

reload_apache()
{
    if apache2ctl configtest 2>/dev/null; then
        invoke-rc.d apache2 force-reload || true
    else
        echo "Your apache2 configuration is broken, so we're not restarting it for you."
    fi
}

I don't think this is sufficient to enable the php5 module; this can be seen when installing lamp-server as follows:

sudo tasksel install lamp-server
sudo echo "<? $world=\"Hello World!\"; echo $world; ?>" > /var/www/test.php
wget http://localhost:80/test.php

test.php is returned unprocessed.

Restarting apache resolves this issue.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libapache2-mod-php5 5.3.10-1ubuntu2
ProcVersionSignature: Ubuntu 3.2.0-18.29-generic 3.2.9
Uname: Linux 3.2.0-18-generic x86_64
ApportVersion: 1.94.1-0ubuntu2
Architecture: amd64
Date: Mon Mar 12 14:53:18 2012
SourcePackage: php5
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
James Page (james-page) wrote :
Gema Gomez (gema)
tags: added: iso-testing qa-daily-tesing
tags: added: qa-daily-testing
removed: qa-daily-tesing
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Looks like there is some open debate on the Debian side as to how best to handle it. The real problem is not that force-reload is insufficient.. its fine sometimes. But that it doesn't initialize php on a new install.

Changed in php5 (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in php5 (Debian):
status: Unknown → New
Revision history for this message
Ondřej Surý (ondrej) wrote :

Fixed in cbdf7c2. Feel free to pull. I am probably going to update php5 in unstable after it migrates to testing.

Changed in php5 (Debian):
status: New → Fix Released
James Page (james-page)
Changed in php5 (Ubuntu):
milestone: none → ubuntu-12.04
Changed in php5 (Ubuntu Precise):
assignee: nobody → James Page (james-page)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package php5 - 5.3.10-1ubuntu3

---------------
php5 (5.3.10-1ubuntu3) precise; urgency=low

  * Cherry picked fixes from Debian testing:
    - d/maxlifetime: Improve maxlifetime script to scan for more SAPIs and
      scan all *.ini in conf.d directory.
      (LP: #916065).
    - d/libapache2-mod-php5.postinst,libapache2-mod-php5filter.postinst:
      Restart apache on first install to ensure module is fully enabled.
      (LP: #953081).
 -- James Page <email address hidden> Wed, 11 Apr 2012 14:27:10 +0100

Changed in php5 (Ubuntu Precise):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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