PHP-VC9/VC6 TS/NTS等版本之间的区别

PHP的更新升级是越来越快了,PHP 5.2 版本已经更新到5.2.17不再更新, 5.3版本的更新到了5.3.8,PHP 5.4马上就要发布,甚至PHP6.0也在开发中。有这么多版本供我们选择,真是方便啊。不过我们在php官网(http://www.php.net /downloads.php)下载php的时候,可能会遇到一个问题,windows下的php有VC9 x86 Non Thread Safe、VC9 x86 Thread Safe、VC6 x86 Non Thread Safe、VC6 x86 Thread Safe等多个版本。那么这些版本有什么区别呢?

以下是官方的解释:

VC9的版本是用legacy VS 2008编译的,VC6的版本是用legacy VS6编译的。
如果你是在windows下使用IIS+PHP的话,你需要下载VC9的版本。如果你是在windows下使用Apache+PHP的话,你需要下载VC6的版本。

Non Thread Safe是指非线程安全,Thread Safe则是指线程安全。
如果是使用ISAPI的方式来运行PHP就必须用Thread Safe(线程安全)的版本;而用FastCGI模式运行PHP的话就没有必要用线程安全检查了,用None Thread Safe(NTS,非线程安全)的版本能够更好的提高效率。

If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP
If you are using PHP with IIS you should use the VC9 versions of PHP
VC6 Versions are compiled with the legacy Visual Studio 6 compiler
VC9 Versions are compiled with the Visual Studio 2008 compiler and have improvements in performance and stability. The VC9 versions require you to have the Microsoft 2008 C++ Runtime (x86) or the Microsoft 2008 C++ Runtime (x64) installed
Do NOT use VC9 version with apache.org binaries

posted on 2014-01-15 12:50  John_ABC  阅读(371)  评论(0编辑  收藏  举报

导航