您的位置:首页 > 运维架构 > Apache

Ubuntu下安装php7后无法启动Apache

2016-06-12 00:07 495 查看
报错提示:Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe.  You need to recompile PHP


由于Apache的运行模式和非线程安全版的php不兼容,所以是需要更改Apache的工作模式。Apache是通过Ubuntu下

apt-get install apache2


安装的,所以在/etc/apache2/目录下有两个文件夹,一个mods-avaiable一个mods-enabled.

将mods-enabled目录下的mpm-event的conf和load链接删除。重建prefork链接

cd mods-enabled/
ln -s  ../mods-available/mpm_prefork.* .


重启apache2,ok了。



参考:

http://php.net/manual/zh/faq.installation.php#faq.installation.apache2

http://www.cnblogs.com/fnng/archive/2012/11/20/2779977.html

http://www.open-open.com/lib/view/open1464766095184.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: