Latest Apache update failed

13 posts / 0 new
Last post
#1 Thu, 10/21/2010 - 09:03
Shirehosting

Latest Apache update failed

Howdi All I just logged on to the server and noticed a new apache update sitting there, thought well should do that. So ran it and the update failed spiting out an error, now apache will not start.

The error I am now getting is this

Failed to start service : * Starting web server apache2 Syntax error on line 53 of /etc/apache2/sites-enabled/0-shirehosting.com.au.conf: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration ...fail!

Server is running Ubuntu 10.04. If you know where to start please let me know.

Thanks

Thu, 10/21/2010 - 09:44
andreychek

Howdy,

That can happen if mod_php was once enabled, but somehow became disabled. There's two ways to fix that:

  1. Go into your Apache config for your various Virtual Servers, and comment out any php_value statements, as they're specific to mod_php

  2. Enable mod_php, by going into Webmin -> Servers -> Apache Webserver -> Global configuration -> Configure Apache Modules, and enable the php5 module.

Thu, 10/21/2010 - 09:56
Shirehosting

Hi andreychek

I took the second option, now I get a new error

Failed to start service :

  • Starting web server apache2 apache2: Syntax error on line 204 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory ...fail!

Thanks Michael

Thu, 10/21/2010 - 09:59
andreychek

It sounds like not only was mod_php no longer enabled, but that it's no longer even installed.

If you go into your server's command line as root, and type this:

apt-get install libapache2-mod-php5

That should handle installing it for you.

-Eric

Thu, 10/21/2010 - 09:59
Shirehosting

Sorry just to add to the above,

I dont seem to have mod_php in Webmin -> Servers -> Apache Webserver -> Global configuration -> Configure Apache Modules ???

Thu, 10/21/2010 - 10:04
Shirehosting

Howdi andreychek

One more question, I'm not at the console and only have Virtualmin to log in to the server. if I run apt-get install libapache2-mod-php5 it asks me to confirm, which I cant .. how do I tell it to just run the command

Thanks again

Thu, 10/21/2010 - 10:08
andreychek

If you go into Webmin -> System -> Software Packages, you should be able to perform the installation from there.

Put the package name in the "Package from APT" field, and click "Search Apt". You'll be able to install it once it finds it in the apt repository.

-Eric

Thu, 10/21/2010 - 10:11
Shirehosting

Thankyou Eric

Once again you saved my backside, all working now.

Regards Michael

Thu, 10/21/2010 - 10:24
Locutus

An additional hint concerning this:

In case some files belonging to a vital package get deleted, in this case the apache 2 PHP module, without actually uninstalling the package, it can be necessary to perform a "forced" reinstall of the package.

That can be accomplished using the shell command apt-get install libapache2-mod-php5 --reinstall

If no SSH shell is available, you can use the Webmin module "Others / Command shell"

To find out which package contains a specific file, you need the "apt-file" command, which you can install using the Webmin package manager, or apt-get install apt-file. Then you can search for the package using apt-file search libphp5.so.

Thu, 10/21/2010 - 10:27
Shirehosting

Thanks Locutus

I will look into that as well

Thanks Michael

Wed, 08/19/2015 - 04:08
oMikR0n

Thanks a lot Locutus! Really appreciate it. But why i get this problem on all latest apache updates?

Wed, 08/19/2015 - 11:19
andreychek

This thread is a bit on the older side :-)

However, we're looking into it to determine why that started occurring just now.

-Eric

Mon, 08/24/2015 - 13:01
oMikR0n

Yeah but helped me now! So i am not the only one facing this again...

Topic locked