Report this

What is the reason for this report?

Apache configuration broken after PHP upgrade

Posted on January 27, 2014

Hi Everyone,

I’ve recently update PHP version in my server, and after that my apache configuration seems to be broken, and I’m not able to fix it.

If it helps, when updating, the ubuntu installer told me that the package had new configuration files that override the old ones, but told me that the default action was NOT to override them, and therefore, that’s what I did. It seems now that the new version of apache is looking for that configuration files, and as I kept the old ones, it’s very broke… :S

Do have any ideas of what should I do to fix it, without reinstalling the server and not loosing any virtualhost?

The error I get is:

apache2: Syntax error on line 211 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/fcgid.load: Cannot load /usr/lib/apache2/modules/mod_fcgid.so into server: /usr/lib/apache2/modules/mod_fcgid.so: cannot open shared object file: No such file or directory

But basically, some other errors were founded until i fix them, but was not able to fix this. It has to do with PHP upgrade from 5.3 to 5.5.

Thanks in advance!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Yes, I added a new PPA repo, and updated after that. This is the package added: <br> <br>https://launchpad.net/~ondrej/+archive/php5 <br> <br>I already tried to reconfigure the package, it does it, but when trying to restart apache, I get the same error: <br> <br>* Restarting web server apache2 [fail] <br> * The apache2 configtest failed. <br>Output of config test was: <br>apache2: Syntax error on line 211 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/fcgid.load: Cannot load /usr/lib/apache2/modules/mod_fcgid.so into server: /usr/lib/apache2/modules/mod_fcgid.so: cannot open shared object file: No such file or directory <br>Action ‘configtest’ failed. <br>The Apache error log may have more information. <br>invoke-rc.d: initscript apache2, action “restart” failed. <br> <br> <br>So, that does not fix my problem. Any other ideas?

That repo also has updated builds of Apache. Try backing up apache’s config files and re-configuring it replacing existing files with new ones

Hello dear Ocean travelers!

I quote pmartelleti: “If it helps, when updating, the ubuntu installer told me that the package had new configuration files that override the old ones, but told me that the default action was NOT to override them”

Do you know if selecting override would have changed the configurations that much? I am wondering how to get past this problem in the future!

Thanks a lot! Have a wonderful day! Cheers, Lionel

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.