Apache is running a threaded MPM ,PHP Module is not compiled to be threadsafe
Posted On 2016年4月6日
问题:
[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
突然不知道为什么,重启httpd后报了如此错误。 可是最近没有任何修改。 莫非是有人修改配置或是系统自动升级了某些http相关软件? 原因产生原因未找到。但是解决办法是有的。
解决方法:
vi /etc/sysconfig/httpd
# # The default processing model (MPM) is the process-based # 'prefork' model. A thread-based model, 'worker', is also # available, but does not work with some modules (such as PHP). # The service must be stopped before changing this variable. # #HTTPD=/usr/sbin/httpd.worker HTTPD=/usr/sbin/httpd
将
HTTPD=/usr/sbin/httpd.worker 改为下面的一行内容
HTTPD=/usr/sbin/httpd
# The default processing model (MPM) is the process-based # 'prefork' model. A thread-based model, 'worker', is also # available, but does not work with some modules (such as PHP). # The service must be stopped before changing this variable.
此篇文章已被阅读3313 次