1

I did a 'do-release-upgrade' Most upgrade went fine. But the upgrade from Apache 2.2.22 to 2.4.7 went wrong. There seems to be something wrong with the php5 apache module.

I get the following error message:

apache2: Syntax error on line 203 of /etc/apache2/apache2.conf: Syntax error on line 
1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/module
/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared   
object file: No such file or directory
Action 'configtest' failed.

How to fix this problem? I'll hope there is easy way to solve this problem. :)

1

1 Answer 1

5

From the error message, the PHP5 Apache module is not present where it should.

First, check the installation status of the PHP5 module package :

user@hostname:~$ dpkg -l |grep libapache2-mod-php5
ii  libapache2-mod-php5              5.5.9+dfsg-1ubuntu4.3               amd64        server-side, HTML-embedded scripting language (Apache 2 module)

If the result is not like above (a line starting by ii) then the module is not or badly installed.

If dpkg returns no line, do :

sudo apt-get update && sudo apt-get install libapache2-mod-php5

If dpkg returns a line not starting with ii, do :

sudo apt-get purge libapache2-mod-php5
sudo apt-get update && sudo apt-get install libapache2-mod-php5
1
  • Note sudo apt-get update && sudo apt-get --purge --reinstall install libapache2-mod-php5 will do the same thing as the second method (under "If dpkg returns a line not starting with ii"), but will wait to uninstall software until any necessary files for reinstalling it have been downloaded. This may be considered preferable in case of a network interruption (and because it requires, in a sense, fewer steps). It can also replace the first method, as it should succeed nicely even if the package isn't already installed. (So the initial dpkg -l | grep ... step could even be skipped.) Sep 6, 2014 at 0:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .