# /etc/init.d/httpd stop
[root@web ~]# which apachectl
/usr/sbin/apachectl
[root@web ~]# which httpd
/usr/sbin/httpd
[root@web ~]# cd /usr/sbin/
[root@web ~]# mv httpd httpd.prefork
# mv httpd.worker httpd
# httpd -k start
apache提示错误:
Apache is running a threaded MPM, but your PHP Module is not compiled
to be threadsafe. You need to recompile PHP. Pre-configuration failed!
原来的php模块不能适用于现在的线程工作模式,需要重新编译才行。于是找到php模块加载相关语句,开始在httpd.conf里找了半天没找到,后来在conf.d/php.conf里才找到加载php模块的语句,晕死。注释掉就ok了
还有另一方法:
apachectl是个shell脚本,将里面的httpd改成httpd.worker也是可以的,不过这样只能通过apachectl这个命令来执行才可以,默认的httpd命令还是原来的,容易混用,所以这种方法不推荐。
阅读(3652) | 评论(2) | 转发(0) |