In PHP based on ts and nts versions - detailed explanation of the difference between vc6 and vc9 compiled versions_php basics:
VC6: legacy Visual Studio 6 compiler, this compiler is used compiled.
VC9: Visual Studio 2008 compiler is compiled using Microsoft's VS editor.
Since apache.org only provides the VC6 version, you can only use VC6 when using the original apache. (There is a version of apache VC9 available on www.apachelounge.com. It should be able to cooperate with PHP VC9. I have never used it.)
TS: Thread Safe thread safety, thread (Thread) safety check will be performed during execution to prevent The new requirement is to start a new thread of CGI execution and exhaust system resources
NTS: Non Thread Safe, non-thread safety, no thread (Thread) safety check is performed during execution
Two types of PHP Execution method: ISAPI and FastCGI.
ISAPI (Internet Server Application Programming Interface) execution method is used in the form of a DLL dynamic library. It can be executed after being requested by the user. It will not disappear immediately after processing a user request, so it needs to be Thread safety check can improve the execution efficiency of the program, so if ISAPI is used to execute PHP, it is recommended to choose the Thread Safe version
Configuration method in apache:
#The following is to load the TS version PHP required
LoadModule php5_module “xxx/php5apache2_2.dll”
#The following line is optional
AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .php .php5 .php4 .php3 .phtml .phpt
FastCGI execution method uses a single thread to perform operations, so there is no need for threading For security checks, removing the protection of thread safety checks can actually improve execution efficiency. Therefore, if FastCGI is used to execute PHP, it is recommended to choose the Non Thread Safe version.
Configuration method in apache:
#The following two lines are necessary to load the NTS version of php. They cannot be written directly as Action application/x-httpd-php "c:/wamp/bin /php/php3.5.6/php-cgi.exe"!
ScriptAlias /php/ "C:/wamp/bin/php/php3.5.6/"
Action application/x-httpd-php "/php/php-cgi.exe"
#In addition, you must have the previous AddType application/x-httpd-php .php .php5 .php4 .php3 .phtml .phpt, so that you can recognize files in php format
#This configuration is possible Also, due to permission issues, php-cgi.exe cannot be used to parse php web pages, so the following paragraph must be added
The official does not recommend that you apply Non Thread Safe to the production environment. So we choose the Thread Safe version of PHP to use.
The default configuration of XAMPP in http-xampp.conf is to use ISAPI
The above is a detailed explanation of the difference between the ts and nts versions in PHP - vc6 and vc9 compiled versions_php Basic content, please pay attention to the PHP Chinese website (www.php.cn) for more related content!