How to disable thread safety in PHP?

柔情痞子 提交于 2020-12-08 07:03:01

问题


I am using some software that requires me to have thread safety disabled. I am working on a Windows server. From what I've read elsewhere, I can't just configure this in the .ini file. Is this true? If so, how would I compile it so that thread safety is turned off?


回答1:


You have to compile PHP with ZTS disabled (compile flag --disable-zts) or download binaries with ZTS disabled.

This won't work properly in some webservers, namely those which process several PHP scripts simultaneously in the same process.




回答2:


You can download compiled non-thread-safe binaries of PHP for Windows from

  • http://windows.php.net/download/



回答3:


It is --disable-maintainer-zts command. May try --disable-posix-threads to.




回答4:


You can download the last version of Zend Optimizer which have the thread safety on http://downloads.zend.com/optimizer/3.3.0/ZendOptimizer-3.3.0-linux-glibc23-x86_64.tar.gz



来源:https://stackoverflow.com/questions/3425514/how-to-disable-thread-safety-in-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!