The difference between PHP vc6 vc9:php version VC6 and VC9, Thread safe and none-thread safe

Source: Internet
Author: User
Tags functions garbage collection http request version thread vc9 versions visual studio

Recently found that a lot of PHP programmers to understand the knowledge of PHP version is not very clear, I also read a lot of similar articles, or feel not clear and comprehensive, online conclusions are ambiguous, here, give the most complete and even arbitrary interpretation.
This article explains: The difference and choice between VC6 and Vc9,thread safety and None-thread safe,apache module and fastcgi.
The major version of PHP is divided into three main branches: PHP4/PHP5/PHP6
Among them, PHP4 because of too old, to OO support weak has been basically eliminated, please disregard PHP4.
PHP6 because there is basically no production line application, but also basically just a concept product, many functions have been implemented on the PHP5.3.3, so also do not elaborate, please disregard PHP6.
The PHP5 version is divided into four main branches: PHP5.2, php5.2.x, PHP5.3 and the recently released PHP5.4.
So how do we choose to apply our own version of the project?
The previous version of PHP5.2 is not worth considering because of some functional flaws or prior versions of bug,php5.2. PHP5.4 is also in beta version number, not stable version, please disregard PHP5.4.
Mainstream PHP program for php5.2.x compatibility is best, and each version of the upgrade brings security and stability improvement, so it is advisable to pick the latest version. The current PHP5.2 series is the latest PHP5.2.17.
And if the product is the development of their own use, PHP5.3 in some ways more advantages, more than a good stability, adding a lot of PHP5.2 do not have functions, such as built-in PHP-FPM, more complete garbage collection algorithm, the introduction of namespaces, SQLITE3 support and so on, is a worthy version of the deployment project, strongly recommended PHP5.3.3.
In addition to the version number, the same version of the PHP version is also different, and in the selection of PHP extensions to be aware of.
Install version: executable MSI format installation package.
Zip Version: Decompression can be used. There is no difference from the install version. It is recommended that you select a zip version.
Debug Edition: Please disregard.
VC6 and VC9
For VC6 or VC9 version of the choice, the PHP official website has a detailed description, the original text is as follows:
Which version do I choose?
If you are are using PHP with Apache 1 or Apache2 from apache.org your need to use the VC6 versions of PHP
If you are are using PHP with IIS your should use the VC9 versions of PHP
VC6 versions are compiled with the legacy Visual Studio 6 Compiler
VC9 versions are compiled with the Visual Studio 2008 compiler and have in improvements and performance. The VC9 versions require to have the Microsoft 2008 C + + Runtime (x86) or the Microsoft 2008 C + + Runtime (x64) Installe D
Don't use VC9 version with apache.org binaries
Which version should I choose?
If you are using PHP under Apache1 or apache2, you should select the VC6 version
If you are using PHP under IIS, you should select the VC9 version
VC6 versions are compiled using visual Studio6
VC9 is compiled using Visual Studio 2008 and improves performance and stability. VC9 version of PHP requires you to install Microsoft 2008 C + + Runtime
Do not use the VC9 version under Apache
TS and NTS
TS refers to thread Safety, which is typically selected when IIS is loaded as ISAPI.
NTS is None-thread Safe, which is typically run in fast CGI, with better performance.
The first Windows version of PHP3.0.17, released on October 20, 2000, started with a thread-safe version, because the Windows system is a multithreaded way of working with the Linux/unix system, which uses multiple processes. Running PHP in CGI under IIS can be very slow because the CGI pattern is based on multiple processes, not multithreading. Normally we would configure PHP to run as an ISAPI, and ISAPI is a multithreaded way, which is much faster. There is a problem, however, that many of the commonly used PHP extensions are developed with Linux/unix ideas, which can cause errors to take down IIS when they run in the ISAPI mode. Therefore, the CGI mode is the safest way to run PHP under IIS, but the CGI model needs to reload and uninstall the entire PHP environment for each HTTP request, and its consumption is enormous.
To accommodate the efficiency and security of PHP under IIS, Microsoft has fastcgi solutions. FASTCGI allows PHP processes to be reused rather than to restart a process with every new request. FastCGI can also allow several processes to execute at the same time. This solves the problem that the CGI process mode consumes too much, and utilizes the advantage that the CGI process mode has no thread security problem. This article links http://www.cxybl.com/html/wlbc/Php/20130326/37401.html

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.