Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the differences between ts-based and nts-based versions of PHP-vc6 and vc9 compiled versions

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article will explain in detail about PHP based on ts and nts version-vc6 and vc9 compiled version of what are the differences, the editor thinks it is very practical, so share it for you to do a reference, I hope you can get something after reading this article.

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 the version of VC6, you can only use VC6 when using the original apache. (a version of apache VC9 is available on www.apachelounge.com, which should work with PHP VC9, but has not been used)

TS:Thread Safe is thread-safe, and thread (Thread) safety checks are performed during execution to prevent system resources from being exhausted by new requirements for starting the CGI execution of new threads.

NTS:Non Thread Safe is not thread-safe, and thread (Thread) safety checks are not performed during execution

There are two ways to execute PHP: ISAPI and FastCGI.

ISAPI (Internet Server Application Programming Interface) execution mode is used in the form of DLL dynamic library, which can be executed after being requested by the user, and will not disappear immediately after processing a user request, so thread safety check is needed to improve the execution efficiency of the program. Therefore, if PHP is executed with ISAPI, it is recommended to choose the Thread Safe version.

Configuration method in apache:

# the following is necessary to load the TS version of php

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 executes the operation by a single thread, so there is no need for thread safety check. Removing the protection of thread safety check can improve the execution efficiency. Therefore, if you use FastCGI 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, and cannot be directly written 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 need to have the previous AddType application/x-httpd-php .php .php5 .php4 .php3 .phtml .phpt, so that you can recognize the file in php format.

# after configuration, you may not be able to parse php pages with php-cgi.exe because of permission issues, so add the following paragraph

AllowOverride None

Options None

Order allow,deny

Allow from all

It is not officially recommended that you apply Non Thread Safe to a production environment, so we chose the Thread Safe version of PHP to use.

The default configuration of XAMPP in http-xampp.conf is to use ISAPI.

On the "PHP based on ts and nts version-what are the differences between vc6 and vc9 compiled version" this article shares here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, please share it out for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report