Difference between PHP thread security and non-thread security versions

Source: Internet
Author: User

When I download the php version from the php manager, I will see one of them, None-Thread Safe and Thread Safe. What is the difference between the two versions, but let's take a closer look at it as an example. We use thread security instead of program security for testing.

First, literally, None-Thread Safe means non-thread security, and no Thread security check is performed during execution. Thread Safe means thread security, the thread security check is performed to prevent the CGI execution method of the new thread from consuming system resources when there are new requirements.

Let's take a look at two PHP Execution Methods: ISAPI and FastCGI. 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 (whether with IIS 6 or IIS 7) to execute PHP, we recommend that you download and execute non-thread safe PHP (PHP 2? ? N has? ? Method: msi, zip ,? Lower? Zip kit ). The Thread security check is prepared for PHP in the ISAPI mode. Because many php modules are NOT Thread-Safe, Thread Safe PHP is required.

Speaking of this, you should know how to select the PHP version. None-Thread Safe or Thread Safe. Which one do you choose?

Conclusion

1. Non-Thread Safe (Non-Thread-Safe) php is applicable to CGI and fastCGI web servers, such as nginx, lighttpd, and iis cgi modes.

2. Thread Safe (Thread-Safe) php is applicable to web servers using isapis or modules, such as iis isapi mode or apache module mode.

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.