现在的位置: 首页 > 综合 > 正文

PHP5+Apache2 worker MPM问题

2013年12月03日 ⁄ 综合 ⁄ 共 402字 ⁄ 字号 评论关闭

据说PHP5不建议和Apache的 worker MPM 搭配使用,但之前就是拿 PHP 5.2.6 + Apache 2.2.4 worker MPM 来跑服务,效果貌似挺好。

后来重新编译了一次 PHP 之后 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!

网上通常说的使用 --with-experimental-zts 参数以及 --enable-maintainer-zts 参数统统试了一遍,结果编 PHP 的时候就通不过了。只有改成使用 prefork MPM。

困扰了N久,最后才发现是因为重编 PHP 的时候加了 --with-openssl 把openssl 模块加进去了的缘故,去掉这个模块就又可以正常与 worker MPM 搭配了。

抱歉!评论已关闭.