package libapache2-mod-php5 5.5.3+dfsg-1ubuntu2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1241498 reported by Bharat
46
This bug affects 7 people
Affects Status Importance Assigned to Milestone
php5 (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

After upgrade apache2 restart failed due to old configuration.

After that I re installed apache2 but then php5 started failing.

ProblemType: Package
DistroRelease: Ubuntu 13.10
Package: libapache2-mod-php5 5.5.3+dfsg-1ubuntu2
ProcVersionSignature: Ubuntu 3.11.0-12.19-generic 3.11.3
Uname: Linux 3.11.0-12-generic x86_64
ApportVersion: 2.12.5-0ubuntu2
AptOrdering:
 libapache2-mod-php5: Configure
 php5: Configure
Architecture: amd64
Date: Fri Oct 18 16:12:42 2013
DuplicateSignature: package:libapache2-mod-php5:5.5.3+dfsg-1ubuntu2:subprocess installed post-installation script returned error exit status 1
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2013-08-29 (49 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MarkForUpload: True
SourcePackage: php5
Title: package libapache2-mod-php5 5.5.3+dfsg-1ubuntu2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to saucy on 2013-10-18 (0 days ago)
modified.conffile..etc.apache2.mods.available.php5.conf: [deleted]
modified.conffile..etc.apache2.mods.available.php5.load: [deleted]

Revision history for this message
Bharat (bmhaskar) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Yolanda Robla (yolanda.robla) wrote :

php5_invoke pdo: already enabled for apache2 SAPI
dpkg: error processing libapache2-mod-php5 (--configure):
 subprocess installed post-installation script returned error exit status 1

Changed in php5 (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in php5 (Ubuntu):
status: New → Confirmed
Revision history for this message
Raju Gautam (raju-rachana) wrote :

php5_invoke readline: already enabled for apache2 SAPI
dpkg: error processing libapache2-mod-php5 (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php5:
 php5 depends on libapache2-mod-php5 (>= 5.5.3+dfsg-1ubuntu2) | libapache2-mod-php5filter (>= 5.5.3+dfsg-1ubuntu2) | php5-cgi (>= 5.5.3+dfsg-1ubuntu2) | php5-fpm (>= 5.5.3+dfsg-1ubuntu2); however:
  Package libapache2-mod-php5 is not configured yet.
  Package libapache2-mod-php5filter is not installed.
  Package php5-cgi is not installed.
  Package php5-fpm is not installed.

dpkg: error processing php5 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 libapache2-mod-php5
 php5
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Oguzhan Alan (5-mail-y) wrote :

Same here:
Fehler traten auf beim Bearbeiten von:
 libapache2-mod-php5
E: Sub-process /usr/bin/dpkg returned an error code (1)

Someone any solution found to this??

Revision history for this message
Flittermice (flittermice) wrote :

I'm not sure because I moved to Arch in the meantime, but I think I solved the problems by installing "libapache2-mod-php5filter" instead. Didn't have any problems with that.

Revision history for this message
Oguzhan Alan (5-mail-y) wrote :

Thank you Flittermice but i have still the same err with libapache2-mod-php5filter

dpkg: Fehler beim Bearbeiten von libapache2-mod-php5filter (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
 libapache2-mod-php5filter
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
goofrider (goofrider) wrote :

I have the same problem here. Install and postinst went fine but dpkg still thinks postinst failed.

---

php5_invoke pdo: already enabled for apache2 SAPI
php5_invoke opcache: already enabled for apache2 SAPI
php5_invoke pdo_pgsql: already enabled for apache2 SAPI
php5_invoke mysql: already enabled for apache2 SAPI
php5_invoke readline: already enabled for apache2 SAPI
php5_invoke pgsql: already enabled for apache2 SAPI
php5_invoke json: already enabled for apache2 SAPI
php5_invoke mysqli: already enabled for apache2 SAPI
php5_invoke pdo_mysql: already enabled for apache2 SAPI
dpkg: error processing package libapache2-mod-php5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 libapache2-mod-php5
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
goofrider (goofrider) wrote :

Judging from the output from libapache2-mod-php5filter...

----
  php5_invoke: Enable module mysqli for apache2filter SAPI
  php5_invoke: Enable module pdo_mysql for apache2filter SAPI
  apache2_invoke: Enable module php5filter
   * Restarting web server apache2
----

In /var/lib/dpkg/info/libapache2-mod-php5.postinst...

----
# Automatically added by dh_apache2
if php5_enable; then
        if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
                . /usr/share/apache2/apache2-maintscript-helper
                for conf in php5 ; do
                        apache2_invoke enmod $conf || exit $?
                done
        fi
fi
# End automatically added section
----

Since php5_enable() always produce an error msg before it exit with status 1, and apache2_invoke was never called, it looks like the only culprit would be "for conf in php5" returned nothing.

It looks like I previously have apache2 and mod-php5 installed and I moved the entire /etc/apache2 elsewhere to solve a previous apache2 upgrade problem, so that might have contributed to it. Looks to me /etc/apache2/mods-available/php5.{conf,load} weren't there and normal remove/reinstall doesn't check for it to put them back. purge/reinstall fixed it.

Revision history for this message
John (jgmuchiri) wrote :

This seems to be a dependency issue if you install libapache2-mod-php5 after apache2.

I fixed this using the following after installing apache2

sudo service apache2 stop

sudo service mysql stop

sudo apt-get purge libapache2-mod-php5

sudo apt-get autoremove

sudo apt-get clean

sudo apt-get install libapache2-mod-php5

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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