Question

Apache configuration broken after PHP upgrade

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!


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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

Complete remove apache2 and install it again and then libapache2-mod-php5. This worked for me. :)

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