Apache HTTP: Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe

Автор: | 12/02/2015
 

apache_logoОшибка

После установки свежего Apache HTTP — возникает ошибка:

# apachectl -t
[Wed Dec 02 12:32:34.187291 2015] [:crit] [pid 3756:tid 140678182410112] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe.  You need to recompile PHP.
AH00013: Pre-configuration failed
Action '-t' failed.
The Apache error log may have more information.

Решение

Проверяем активные модули, находим mpm_event:

# ls -l /etc/apache2/mods-enabled/
...
lrwxrwxrwx 1 root root 32 Dec  2 12:29 mpm_event.conf -> ../mods-available/mpm_event.conf
lrwxrwxrwx 1 root root 32 Dec  2 12:29 mpm_event.load -> ../mods-available/mpm_event.load

Отключаем его:

# a2dismod mpm_event

Активируем mpm_prefork:

# a2enmod mpm_prefork

Проверяем:

# apachectl -t
Syntax OK