Apache + php5 problem after 12.04.3 to 14.04.i do release upgrade (server)
13,190
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
Author by
kevinx
Updated on September 18, 2022Comments
-
kevinx almost 2 years
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. :)
-
Eliah Kagan almost 10 yearsIn your recently deleted "answer" post, I think you mentioned the existing answer here worked. If you consider Benoit's answer to have solved the problem you asked about in this question, I'd recommend you accept that answer by clicking the gray check mark next to (to the left of) it. (More info here about that.)
-
-
Eliah Kagan almost 10 yearsNote
sudo apt-get update && sudo apt-get --purge --reinstall install libapache2-mod-php5
will do the same thing as the second method (under "Ifdpkg
returns a line not starting withii
"), 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 initialdpkg -l | grep ...
step could even be skipped.)