doupa8922 2018-05-21 23:28 采纳率: 100%
浏览 109
已采纳

禁用PHP 5.6.36线程安全

I am compiling PHP 5.6.36 with Apache 2.4.33 on a CentOS 7 Server and the PHP Thread Safe is always enabled. I did try to compile using --disable-posix-threads but this option is not a "configure" option and also with --disable-maintainer-zts and at the end the TS is still enabled on my Server.

When I was using Apache 2.2 I didn't had this problem, once my server need to have PHP always disabled. My Zend library is compiled without TS and I will run PHP as module and not as cgi or fast-cgi.

Is there any way to compile PHP 5.6 with Apache 2.4 without TS enabled?

  • 写回答

1条回答 默认 最新

  • douyan8413 2019-01-25 06:29
    关注

    Apache 2.4.33 compiles using worker MPM by default which is multi threaded. When you compile PHP against a multi threaded MPM it will be thread safe enabled.

    The solution is to compile Apache with --with-mpm=prefork which is single threaded. PHP compiled against that will have thread safe disabled.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 echarts动画效果失效的问题。官网下载的例子。
  • ¥60 许可证msc licensing软件报错显示已有相同版本软件,但是下一步显示无法读取日志目录。
  • ¥15 Attention is all you need 的代码运行
  • ¥15 一个服务器已经有一个系统了如果用usb再装一个系统,原来的系统会被覆盖掉吗
  • ¥15 使用esm_msa1_t12_100M_UR50S蛋白质语言模型进行零样本预测时,终端显示出了sequence handled的进度条,但是并不出结果就自动终止回到命令提示行了是怎么回事:
  • ¥15 前置放大电路与功率放大电路相连放大倍数出现问题
  • ¥30 关于<main>标签页面跳转的问题
  • ¥80 部署运行web自动化项目
  • ¥15 腾讯云如何建立同一个项目中物模型之间的联系
  • ¥30 VMware 云桌面水印如何添加