The differences and usage details of VC6 VC9 TS and NTS versions in PHP

  • 2020-10-31 21:40:06
  • OfStack

1. Differences between VC6 and VC9:

VC6 is compiled using the Visual Studio 6 compiler. If your PHP is built using Apache, choose VC6.

VC9 is compiled using the Visual Studio 2008 compiler. If your PHP is built using IIS, choose VC9.

VC9 is a version for IIS servers with no support for APACHE, while VC6 provides support for both IIS and apache

2. Differences between Ts and nts:

The PHP version of Windows has been divided into Thread Safe and NoneThread Safe since version 5.2.1.

To begin with, Thread Safe is literally thread-safe, and thread (Thread) safety checks are performed during execution to prevent new requests from exhausting system resources with respect to the CGI execution of starting a new thread. Non Thread Safe is non-thread-safe and does not perform thread (Thread) safety checks at execution time.

3. There are two ways of implementing PHP: ISAPI and FastCGI.

The execution mode of ISAPI is in the form of DLL dynamic library, which can be executed after being requested by the user and will not disappear immediately after processing one user request. Therefore, thread safety check is needed to improve the execution efficiency of the program. Therefore, if ISAPI is used to execute PHP, it is recommended to select the version of ThreadSafe.

However, FastCGI is executed by a single 1-thread, so there is no need for thread safety check. Removing the protection of thread safety check can improve the execution efficiency. Therefore, if PHP is executed by FastCGI, it is recommended to select NonThread Safe version.

Through phpinfo (); Check the Thread Safety item to see if it is thread safe. If it is enabled, 1 generally it should be ts version, otherwise it is nts version.


Related articles: