The apache2 configtest failed: Segmentation fault (core dumped)

Everytime i restart apache2, the terminal output like this:

 * Restarting web server apache2 [fail] * The apache2 configtest failed.
Output of config test was:
Segmentation fault (core dumped)
Action 'configtest' failed.
The Apache error log may have more information.

How to solve this problem?

1

4 Answers

I have successfully solved this problem by using this command: sudo a2dismod php7.0 then i restart apache2, it work normally.

2

This happened for me after I upgraded MySQL from 5.5.55 to 5.7.x. Not sure if it's related, but know from my experience that moving forward PHP to 7 and MySQL to 5.7 or greater and making everything play together nicely isn't always straightforward.

Anyway.. I did this:

a2dismod php7.0 //now it tells me to restart
service apache2 restart //it worked! But I want php7.0
//let's try and get it back
a2enmod php7.0 //oops, get this message: `ERROR: Module php5 is enabled - cannot proceed due to conflicts. It needs to be disabled first!`
a2dismod php5 //I don't need this for any of my sites
service apache2 restart
a2enmod php7.0 //it works with no errors indicated
service apache2 restart //and, we're good to go!
1

For me it helped to delete the

php5.conf 

in ../mods-enabled/
There were both php7.conf and php5.conf in ../mods-enabled/.

I use php7.0 on Ubuntu 16 and php5.3 is installed with phpbrew but off...

In my case the problem was upgrade of apache/php that added 2 symbolic links in /etc/apache2/mods-enabled:

php5.conf -> ../mods-available/php5.conf
php5.load -> ../mods-available/php5.load

Although I have now PHP 7.1, so removal of them fixed the problem.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like