PHP Non-thread-safe and thread-safe version selection Tips

Source: Internet
Author: User
Tags vc9

Starting with the PHP5.2.10 version (now available in PHP5.2.10 and 5.3 two versions), there are none-thread safe and Thread safe two versions to choose from, what is the difference between these two versions, and how should they be chosen as users? The following friends will tell you.
Starting with the PHP5.2.10 version (now available in PHP5.2.10 and 5.3 two versions), there are none-thread safe and Thread safe two versions to choose from, what is the difference between these two versions, and how should they be chosen as users? The following friends will tell you.

First of all, in the literal sense, none-thread safe is non-thread-safe, do not thread security at execution time, thread safe is threaded, thread security is performed, to prevent new requirements to start a new thread of CGI The execution method exhausts the system resources.

Let's look at two ways of executing PHP: ISAPI and fastcgi. FastCGI execution is performed in a single thread, so there is no need for thread security checks, and removing thread security checks can improve execution efficiency, so if PHP is executed in FastCGI (whether with IIS 6 or IIS 7), it is recommended to download, execute Non-thread Safe php (php Two files are packaged in two ways: MSI, zip, download the zip kit). Thread safety checks are prepared for the ISAPI way of PHP, because there are many PHP modules that are not thread-safe, so you need to use the thread safe PHP.

Speaking of which, you should know how to choose which version of PHP. None-thread safe or Thread safe, which would you choose?

The version of PHP under Windows is updated quickly, the newest is PHP7 already, now the version of Windows can be downloaded in PHP official PHP for Windows (http://windows.php.net/download/), When downloading the same version has VC9 x86 Non thread safe, VC9 x86 thread safe, VC6 x86 Non thread safe, VC6 x86 thread safe and other four versions. So what's the difference between these versions?

The version of VC9 was compiled with Legacy VS 2008, and the VC6 version was compiled with Legacy VS6.

If you are using iis+php under Windows, you need to download the VC9 version.
If you are using apache+php under Windows, you need to download the VC6 version.

Non thread safe refers to non-thread safety, thread safe refers to threading security.

If you are using ISAPI to run PHP, you must use the thread safe version, while running PHP in fastcgi mode, there is no need to use thread security, with none thread safe (NTS, non-thread-safe) Version to better improve efficiency.

This way, how to choose your PHP version of the appropriate, to download the appropriate PHP for your system.

Hope this PHP non-thread-safe and thread-safe version of the selection tips of the article can help you, if you think this site maintenance tutorial useful, don't forget to recommend to your friends Oh! If you have a good experience, take it out and share it with everyone: if everyone comes up with an experience, then we'll all get an extra pile of other people's experience.

'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
  • '). Text (i)); }; $numbering. FadeIn (1700); }); });

    The above describes the PHP non-thread-safe and thread-safe version of the selection techniques, including aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • Related Article

    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.