从PHP5.2.10版本开始(现在有PHP5.2.10和5.3两个版本),有None-Thread SafeThread Safe两种版本的可供选择,这两种版本有何不同,作为使用者来说又应该如何选择呢?下面聚友将为您讲述。


先从字面意思上理解,None-Thread Safe就是非线程安全,在执行时不进行线程(thread)安全检查;Thread Safe就是线程安全,执行时会进行线程(thread)安全检查,以防止有新要求就启动新线程的 CGI 执行方式耗尽系统资源。


再来看PHP的两种执行方式:ISAPI和FastCGI。FastCGI执行方式是以单一线程来执行操作,所以不需要进行线程的安全检查,除去线程安全检查的防护反而可以提高执行效率,所以,如果是以 FastCGI(无论搭配 IIS 6 或 IIS 7)执行 PHP ,都建议下载、执行 non-thread safe 的 PHP (PHP 的二进位档有两种包装方式:msi 、zip ,请下载 zip 套件)。而线程安全检查正是为ISAPI方式的PHP准备的,因为有许多php模块都不是线程安全的,所以需要使用Thread Safe的PHP。

我应该选择哪个版本的php?

1.如果你的服务端是apache1或者apache2,请下载vc6版本;
2.如果服务端是iis,请下载vc9版本;
3.vc6版本编译自古老的visual studio 6编译器;
4.vc9版本使用visual studio 2008编译,在性能和兼容性上都做了优化。vc9版本要求安装MS 2008 C++运行库,下面有下载地址。

Which version do I choose?

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

PHP 5.3 (5.3.3)

Download source code [19.16MB]

VC9 x86 Non Thread Safe (2010-Jul-21 20:38:25)

  • Zip [14.44MB]
    sha1: da76046b1b084c87876a4259b32f9c2c0e02e0f7
  • Installer [26.75MB](FastCGI模式+IIS推荐下载)
    sha1: 28644da1cb99cd0c337dc16a86d5479ff206d9a9
  • Debug Pack [7.82MB]
    sha1: bface46c3aeb660b109cd6561642d920523d2a73

VC9 x86 Thread Safe (2010-Jul-21 20:29:51)

  • Zip [14.57MB]
    sha1: 80dcf3150e0d8dd6569d5e2e7e8ac6ad2b956b49
  • Installer [26.86MB](ISAPI模式+IIS推荐下载)
    sha1: ae8c5c0e705ca97825279c8d9e67e902f89dada1
  • Debug Pack [8.16MB]
    sha1: c5b4bb1429f43d07126888f3a09c82617dee5a46

VC6 x86 Non Thread Safe (2010-Jul-21 20:11:31)

  • Zip [12.99MB]
    sha1: fa29bd3f9633389f23fdf8c97b8bb16ecb83d62a
  • Installer [23.69MB]
    sha1: a3b4c3089e21220d5c149b2858530d64ec160937
  • Debug Pack [4.89MB]
    sha1: 2ac2e5cea3c6ad20afba3ca7db93f15ffc704770

VC6 x86 Thread Safe (2010-Jul-21 20:06:17)

  • Zip [13.12MB]
    sha1: 34f53c60067db5102cffc9c9adff5a67536b731c
  • Installer [23.81MB](ISAPI模式+Apache推荐下载)
    sha1: 194fa35e0d300c67ebbfca00a0efff00020d4d41
  • Debug Pack [5.05MB]
    sha1: f011363d90392dc25925dda2ebd7352dbff159cd