The differences in PHP based on TS and NTS version-VC6 and VC9 compiled version _php Foundation

Source: Internet
Author: User

Vc6:legacy Visual Studio 6 compiler is compiled using this compiler.
Vc9:visual Studio 2008 compiler, is compiled using Microsoft's vs Editor.
Because apache.org only provides VC6 versions, only VC6 is used when using the original Apache. (Www.apachelounge.com has Apache VC9 version provided, should be able to work with PHP VC9, no use)
Ts:thread Safe thread safety, execution with thread (thread) security checks to prevent new requirements from running out of system resources by starting a CGI execution of a new thread
Nts:non thread safety is not thread safe and does not carry out thread security checks at execution time
Two ways to execute PHP: ISAPI and fastcgi.
The ISAPI (Internet Server application programming Interface) is executed in the form of DLL dynamic libraries that can be executed after being requested by the user and not disappear immediately after processing a user request, Therefore, thread security checks are required to improve the execution efficiency of the program, so if you are using ISAPI to execute PHP, it is recommended that you select the thread safe version
How to configure in Apache:

#下面这个是加载TS版本的php必须的
LoadModule php5_module "Xxx/php5apache2_2.dll"
#下面这行可有可无

AddType Application/x-httpd-php-source. Phps
AddType application/x-httpd-php. php. php5 php4. php3. phtml


FastCGI execution is done with a single thread, so there is no need for thread security checks, and the removal of thread security checks can improve execution efficiency, so if you are fastcgi to execute PHP, it is recommended that you choose non thread safe version.
How to configure in Apache:

#下面这两行是加载NTS版本的php必须的, can not 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"

#另外, you need to have AddType application/x-httpd-php php php5 php3. phtml to get to know the files in PHP format.

#这样配置完可能还会因为权限问题而无法用php-cgi.exe to parse the PHP Web page, so add the following section

<directory "c:/wamp/bin/php/php5.3.6/" >
AllowOverride None
Options None
Order Allow,deny
Allow from all
</Directory>
The authorities do not recommend that you apply non thread safe to the production environment, so we chose the PHP version of the thread safe to use.
XAMPP the default configuration in http-xampp.conf is the way to use ISAPI

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.