[php-maint] Bug#463905: Bug#463905: PHP scripts fail after install of php5-common 5.2.5-2

Steve Langasek vorlon at debian.org
Tue Feb 5 07:09:17 UTC 2008

On Mon, Feb 04, 2008 at 07:36:37AM -0800, Cam Ellison wrote:

> > Er, then that's a problem since you said you did *not* try
> > php5-common 5.2.5-1, and libapache2-mod-php5 depends on php5-common
> > of the same version. You seem to be doing something quite unsupported
> > with the packages.

> Actually, using apt-get there was php5-common version 5.2.5-2 and 
> libapache2-mod-php5 version 5.2.5-1.  I ran apt-get install with other 
> packages after installing this version of php5-common, with no errors.  
> I ran apt-get install with selected packages instead of apt-get upgrade 
> in order to avoid those packages with bugs.

I would like to see an apt log of this (/var/log/apt/term.log).  apt should
never behave this way, it should honor the dependencies declared by the
packages; and clearly dpkg *did* honor them, or else the libapache2-mod-php5
package would have been (wrongly) configured and you wouldn't have had any

> > And this would explain why php5 was not enabled in apache2, because
> > libapache2-mod-php5 cannot be in an installed state if there's a
> > version mismatch between libapache2-mod-php5 and php5-common; and
> > before it's in state "installed", the module is not enabled for
> > apache2's use (this is done in the libapache2-mod-php5 postinst).

> I understand this, but why would there not be a warning and refusal to 
> continue, or inclusion of libapache2-mod-php5 version 5.2.5-2 in the 
> install process?  It was only after the error came up and I went 
> searching for reasons that I discovered the .conf and .load files were 
> missing.

I don't know.  The apt log should show this.

> What I didn't include with the previous message was this attempt, which 
> I made after I found that php5 wasn't working, and before I discovered 
> that php5.conf and php5.load were not present:

>  $ dpkg -i libapache2-mod-php5_5.2.5-1_i386.deb
> dpkg - warning: downgrading libapache2-mod-php5 from 5.2.5-2 to 5.2.5-1.
> (Reading database ... 202474 files and directories currently installed.)
> Preparing to replace libapache2-mod-php5 5.2.5-2 (using 
> libapache2-mod-php5_5.2.5-1_i386.deb) ...
> Unpacking replacement libapache2-mod-php5 ...
> dpkg: dependency problems prevent configuration of libapache2-mod-php5:
>  libapache2-mod-php5 depends on php5-common (= 5.2.5-1); however:
>   Version of php5-common on system is 5.2.5-2.
> dpkg: error processing libapache2-mod-php5 (--install):
>  dependency problems - leaving unconfigured
> Errors were encountered while processing:
>  libapache2-mod-php5

> Would the existing php5.conf and php5.load have been removed by dpkg, 
> even though it was refusing to configure?  

No, the conffiles in /etc/apache2/mods-available/ would remain intact.  The
symlinks under /etc/apache2/mods-*enabled*/, however, *would* be removed
during the upgrade, and would only be restorted once libapache2-mod-php5 is

> Regardless, this does not explain why php5 was not working with version 
> 5.2.5-2 of php5-common, but does work with the earlier version.

If there was a warning message you overlooked indicating that
libapache2-mod-php5 was going to be auto-deconfigured, or if apt had failed
to display this warning, that would explain all of your symptoms.

I can't reproduce any of these problems here, though, short of forcing
libapache2-mod-php5 into a state of broken dependencies.

Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org

More information about the pkg-php-maint mailing list