Differences between vc6 x86 and vc9 x86 in Windows PHP and the meaning of non thread safe

Source: Internet
Author: User
Tags vc9

PHP5.3 and later versions of VC9 For Windows
X86 Non Thread Safe, VC9 x86 Thread Safe, VC6 x86 Non Thread Safe, VC6 x86 Thread Safe

On the left bar of the official website, a message is displayed:

Which version do I choose?

If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP

If you are using PHP with IIS you shoshould 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 improvements in performance and stability. The VC9 versions require you to have the Microsoft
2008 C ++ Runtime (x86) or the Microsoft
2008 C ++ Runtime (x64) installed

DoNotUse VC9 version with apache.org binaries

VC9 versions of Apache can be fetched at Apache
Lounge. We use their binaries to build the Apache SAPIs.

I. How to select the vc9 and vc6 versions of php5.3

VC6 is the legacy Visual Studio 6 compiler, which is compiled using vs6.
VC9 is the Visual Studio 2008 compiler, which is compiled using vs9.
In Windows, which version of PHP will be downloaded?
If you are using Apache + PHP in windows, select VC6;
If you are using IIS + PHP in windows, select VC9.


Ii. How to select the Thread Safe and Non-Thread Safe versions of PHP5.3
First, it is literally understood that Thread Safe is Thread security, and Thread security check is performed during execution, to prevent the new thread from consuming system resources by starting the CGI execution mode. Non-Thread Safe is Non-Thread security and does not perform Thread security checks during execution.
Let's take a look at two PHP Execution Methods: ISAPI and FastCGI.
The ISAPI is executed in the form of a DLL dynamic library. It can be executed after a user request. After processing a user request, it will not disappear immediately. Therefore, thread security check is required, in this way, the execution efficiency of the process is improved. If you use ISAPI to execute PHP, we recommend that you select the Thread Safe version;
FastCGI executes operations in a single thread, so it does not need to perform thread security checks. Apart from the thread security check protection, it can improve the execution efficiency, if you use FastCGI to execute PHP, we recommend that you select the Non-Thread Safe version.

We do not recommend that you use Non-Thread Safe in the production environment, so we chose PHP of Thread Safe.


Note that in Linux/Unix, there must be no distinction between vc9 and vc6, but thread security. PHP is usually compiled and installed in Linux, and configure needs to indicate whether thread security needs to be enabled:

–with-tsrm-st          Use SGI's State Threads–with-tsrm-pthreads    Use POSIX threads (default)

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.