Apache with Worker MPM giving error - your PHP Module is not compiled to be threadsafe. You need to recompile PHP

I am having Ubuntu 14.10 and Apache 2.4. Currently Apache is running default mpm_prefork and I want to change it to mpm_worker.

I followed this Apache enable worker mpm to disable mpm_prefork and enable mpm_worker but it is giving error "Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP." when I am restarting apache.

Now this is because php 5 doesn't work with mpm_worker so -

I followed this How to configure Apache to run PHP as FastCGI on Ubuntu 12.04 via terminal? and now I am running fastcgi as shown in phpinfo.

enter image description here

Everything looks fine but again, when I am disabling mpm_prefork and enabling mpm_worker, I am getting this error

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

So I have have to go to default prework module to keep the site running. I am not sure what else to be done, any help ?

4 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

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