When I download the php version from the php manager, I will see one of them, None-Thread Safe and Thread Safe. What is the difference between the two versions, but let's take a closer look at it as an example. We use thread security instead of program security for testing.
First, literally, None-Thread Safe means non-thread security, and no Thread security check is performed during execution. Thread Safe means thread security, the thread security check is performed to prevent the CGI execution method of the new thread from consuming system resources when there are new requirements.
Let's take a look at two PHP Execution Methods: ISAPI and FastCGI. FastCGI executes operations in a single thread, so it does not need to perform thread security checks. Apart from the thread security check protection, it can improve the execution efficiency, if you use FastCGI (whether with IIS 6 or IIS 7) to execute PHP, we recommend that you download and execute non-thread safe PHP (PHP 2? ? N has? ? Method: msi, zip ,? Lower? Zip kit ). The Thread security check is prepared for PHP in the ISAPI mode. Because many php modules are NOT Thread-Safe, Thread Safe PHP is required.
Speaking of this, you should know how to select the PHP version. None-Thread Safe or Thread Safe. Which one do you choose?
Conclusion
1. Non-Thread Safe (Non-Thread-Safe) php is applicable to CGI and fastCGI web servers, such as nginx, lighttpd, and iis cgi modes.
2. Thread Safe (Thread-Safe) php is applicable to web servers using isapis or modules, such as iis isapi mode or apache module mode.