Explore, Learn & Share

Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP.

[dfads params=’groups=-1′]

After installing Apache2, MySQL & PHP on Debian wheezy 7.1, I tried to reboot the apache server. It showed me the following error.
Starting web server: apache2[Fri Dec 27 11:29:16 2013] [crit] Apache is running a threaded MPM, but your PHP Module
is not compiled to be threadsafe. You need to recompile PHP.
Pre-configuration failed
Action 'start' failed.
The Apache error log may have more information.
failed!

So I searched through the internet to recomplie the PHP Source. But none of the tutorials were best and feasible.

Finally, after long try I found the command below that helped me to run the apache and PHP along.
apt-get install apache2-mpm-prefork

[dfads params=’groups=-1′]

6 responses to “Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP.”

  1. balintant Avatar
    balintant

    Thank you so much! You saved 2 days for me. 🙂

    1. admin Avatar
      admin

      Thank you for reading from my blog. 🙂

  2. Waldenylson Avatar
    Waldenylson

    Thanks guy, you save me, 1 day trying…

    1. admin Avatar
      admin

      Always welcome 🙂

  3. JD Avatar
    JD

    I’m not entirely sure that enabling prefork is a solution, more like a bad workaround due to a really poor decision on the part of the Ubuntu devs to bundle PHP pre-compiled without thread support.

  4. Maths Avatar
    Maths

    Didnt work for me. Using Ubuntu 14.04 and apache 2.4.7. I still have the same error after installing this. 🙁

Leave a Reply to JD Cancel reply

Your email address will not be published. Required fields are marked *