启动apache服务器报错:httpd not running, trying to start和Segmentation fault: 11 $HTTPD "$@"

昨天弄了一下PHP,更新了一下,然后
localhost就打不开了

启动apache服务器报错:httpd not running, trying to start和Segmentation fault: 11 $HTTPD

再次启动apache(sudo apachectl -k restart)就报错:

httpd not running, trying to start
/usr/sbin/apachectl: line 92: 8068 Segmentation fault: 11 HTTPD" @”

具体原因不太清楚,刚学习后台:
解决办法是:
将httpd.conf文件里面的:
LoadModule php5_module libexec/apache2/libphp5.so
这一句注释掉(前面加个#):

LoadModule php5_module libexec/apache2/libphp5.so

重启服务器解决.
( 猜测是因为更新了PHP,我的现在是PHP7,所以加载5是错误的).

你可能感兴趣的:(php)