Windows version of PHP starts with thread safe (thread safety) and none thread safe (NTS, non-5.2.1) from version
Thread-safe), the difference between the two is where. What kind of it should be used. Here's a simple introduction.
The first Windows version of PHP3.0.17, released from October 20, 2000, starts with a thread-safe version, which is
In contrast to the Linux/unix system, which uses multiple processes, the Windows system is a multi-threaded way of working. If
Running PHP in CGI under IIS can be very slow, because the CGI pattern is based on multiple processes, not multithreading.
Normally we would configure PHP to run as an ISAPI, and ISAPI is a multithreaded way, which is much faster. But there is a
Problem, many of the commonly used PHP extensions are developed with a linux/unix idea of how the ISAPI works
Error will take down IIS. So in IIS, the CGI mode is the safest way to run PHP, but the CGI schema for each HTTP request
Need to reload and uninstall the entire PHP environment, its consumption is enormous.
To accommodate the efficiency and security of PHP under IIS, Microsoft has fastcgi solutions. FastCGI can make the PHP process heavy
Reuse rather than each new request to restart a process. FastCGI can also allow several processes to execute at the same time. This solves both
The problem of the CGI process mode consumption is too large, and the use of the CGI process mode does not exist the advantage of thread security problems.
Therefore, if you are using ISAPI to run PHP, you must use the thread safe version;
fastcgi mode to run PHP there is no need for thread security checks, with none thread safe (NTS, non-threading safety)
Version to better improve efficiency.