0

I upgraded to Ubuntu server 14.04 expecting the default Apache installation would use the new event MPM, but instead I find the old memory-eating prefork.

I've successfully set up event MPM in Arch Linux, but I'm failing to do so on Ubuntu. I keep getting:

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

I've already installed php-fpm, and configured Apache2 to use it, but since the config files for Apache2 are different on Ubuntu, I'm not quite sure whether I'm doing it on the right place.

Any idea on how to make PHP thread safe so I can use Apache2 “event MPM”; without having to manually recompile PHP, of course?

1 Answer 1

0

A small bit of speculation involved here, but I'm guessing that since you upgraded, rather than doing a clean install, your old Apache configuration (including mods-enabled) was not touched, as is typical. On a clean install of 14.04 LTS, event MPM is standard:

foo@CHANGEME-U14LTS:~$ ls /etc/apache2/mods-enabled/|grep mpm
mpm_event.conf
mpm_event.load

Your problem with PHP likely stems from similar in-place upgrade issues. Following the steps here on that same clean install was sufficient in getting PHP-FPM up and running on my test box.

Just to eliminate the obvious, you did remember to disable mod_php in your Apache config... right? Ubuntu's mod_php is not complied thread-safe; and if you still had mpm-prefork loading, there's a good chance that's still there, too. Regardless, I'd highly recommend moving your static web content to a clean install of 14.04, unless you want to sort through disabling all the old cruft and set up all the new best practices yourself.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .