Vc6,vc9,vc11,ts,nts Differences in PHP versions

Source: Internet
Author: User
Tags vc9

Take windows as an example to see the file name downloaded to php zip

Php-5.4.4-nts-win32-vc9-x86.zip


Vc6:legacy Visual Studio 6 compiler, is compiled with this compiler.
vc9:visual Studio compiler, which is compiled by this compiler.

This is actually not much of an impact because from PHP 5.3, there is no VC6 version available to download the

Iis

If you want to use IIS to configure PHP, then you need to choose non-thread Safe (NTS) version of php

Apache

If you are using the Apache version from Apache Lounge (website:http://apachelounge.com/), you can use PHP VC11 x86 or x64 version.

If you use the Apache1 or Apache2 downloaded from apache.org to build the PHP environment, you can only use the VC6 version, not the vc9+ version.

VC9 and the VC11

VC9 and VC11 are the latest versions of PHP (these two editions are compiled by Visual Studio 2008 and Visual Studio 2012, respectively), and include improvements to performance and stability.

The VC9 version requires users to install the Microsoft Visual C + + SP1 Redistributable Package (x86 | x64)

VC11 version requires users to install Visual C + + redistributable for Visual Studio (x86 | x64)


Ts:thread Safe thread Safety, thread security check on execution
Nts:non thread safe is non-threaded and does not carry out threading (thread) security checks at execution time

I use the apache+php mode, generally the PHP as a module load into Apache, then the Apache parent process-multi-child process of the working mode, is the need for thread security, so if you are executing PHP in this way, select the TS version

So if you are using fastcgi, such as php-fpm to manage PHP execution, you do not need to thread security, then select NTS Version of PHP

--------------------------------------------------------------------------------------------------------------- ------------
PHP 5.5.0 Beta 1 After the release, installation problems, the home computer upgrade is successful, the company's computer has been prompted to not load to the service. The operating system is the same, no difference. Www.php.net on the left side of the official website reminds me.

Php-5.5.0beta1-win32-vc11-x86

The name of the installation package has also been explained, to run must install VC11, x86 represents 32 bit, if x64 is 64 bits, the number of bits for the installation vc11 helpful, personal advice vc11 x86, x64 Two versions are installed on the better, no conflict.

Then start the service and fix it. Phpinfo information is as follows:

--------------------------------------------------------------------------------------------------------------- --------------

Vc6:legacy Visual Studio 6 compiler is compiled with this compiler.
Vc9:visual Studio compiler, is compiled with Microsoft's vs Editor.
Since apache.org only provides VC6 versions, only VC6 can be used when using the original Apache. (Www.apachelounge.com on the Apache VC9 version provided, should be able to work with PHP VC9, no use)
Ts:thread Safe thread Safety, thread security during execution, to prevent new requirements from running out of system resources to start the CGI execution of new threads
Nts:non thread safe is non-threaded and does not carry out threading (thread) security checks at execution time
Two ways of executing PHP: ISAPI and fastcgi.
ISAPI (Internet Server application programming Interface) is executed in the form of DLL dynamic libraries, which can be executed after a user request and will 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 executing PHP with ISAPI, it is recommended that you choose 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. Phpt


FastCGI execution is performed on a single thread, so there is no need for thread security checks, and the removal of thread safety checks can improve execution efficiency, so if PHP is executed in fastcgi, it is recommended to choose the non thread safe version.
How to configure in Apache:

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

#另外, there are AddType application/x-httpd-php. php. php5. PhP4 php3. phtml. Phpt so that you can recognize files in PHP format

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

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

Vc6,vc9,vc11,ts,nts Differences in PHP versions

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.