Apache2 won't start after packages update / Invalid comand: "php_value memory_limit +32M"

I just upgraded one or two virtualmin packages and a bunch of apache2 packages on the last update a few days ago, now apache2 won’t start. I get the following error when trying to start apache in virtualmin:


Starting web server apache2
Syntax error on line 39 of /etc/apache2/sites-enabled/mydomain.com.conf:
Invalid command ‘php_value’, perhaps misspelled or defined by a module not included in the server configuration …fail!


Line 39 is: “php_value memory_limit +32M”

I tried differnt memory values but no change.

I tried removing apache2 then reinstalling it and no effect. I’ve never had any troubles before updating system or virtualmin packages before in virtualmin / webmin. I remember during one of the package updates it said it was unable to start apache.

Any ideas what I can do here to get apache running again?

This is an Ubuntu 10.04 LTS rackspace cloud server using virtualmin pro and drupal.

Thanks…

That can happen if mod_php is disabled or removed, and you have mod_php commands in your Apache config file.

I’d probably start by reinstalling mod_php by typing this from the command line as root:

apt-get install libapache2-mod-php5

Then restart Apache after it installs.

-Eric

Thanks Eric that helped. I actually had libapache2-mod-php5 installed but I didn’t bother to reinstall it as I did with the other apache2 packages. So I ran:

apt-get --reinstall install libapache2-mod-php5

and got the same fail message as above. I can’t remember if I tried to start apache at that moment or ran the command to reinstall apache again but after that second run there was no ‘fail’ error and apache then started ok on the second attempt in virtualmin. So I guess something in the apache package upgrade a few days ago went wrong.

I always wondered when there are virtualmin and system updates, is running one before the other preferred? I wonder if that had anything to do with it?

I’ll keep a close watch on the package updates in the future. Since this is the first one I’ve seen fail in years I haven’t watched them as closely as I should have.

Thanks…

Well, if it was installed, the other possibility is that the module was just disabled… you could re-enable it by running “a2enmod php5”. However, reinstalling the package should also have that same effect.

Glad to hear it’s working for you though!

-Eric

Yep, might have been. In any case I’ll keep a good watch over the updates from now on so I don’t miss anything.

Yes me too…thanks again Eric,

Doug