


The difference between thread-safe and non-thread-safe versions of PHP_PHP Tutorial
Jul 13, 2016 am 10:43 AMWhen I download the php version from the php management site, I will see that there is a None-Thread Safe version and a Thread Safe version. So what is the difference between these two versions? But if you look carefully, there is an introduction that is right for us. Use thread safety instead of thread safety for testing.
First understand it literally, None-Thread Safe means non-thread safety, no thread safety check is performed during execution; Thread Safe means thread safety, and thread safety check is performed during execution to prevent The CGI execution method of starting a new thread when there is a new request exhausts system resources.
Let’s look at the two execution methods of PHP: ISAPI and FastCGI. The FastCGI execution method uses a single thread to perform operations, so there is no need to perform thread safety checks. Removing the protection of thread safety checks can improve execution efficiency. Therefore, if FastCGI (whether paired with IIS 6 or IIS 7) is used to execute PHP, It is recommended to download and execute non-thread safe PHP (the second digit of PHP has different package methods: msi, zip, download the zip package). The thread safety check is prepared for ISAPI PHP. Because many PHP modules are not thread safe, you need to use Thread Safe PHP.
At this point, everyone should know how to choose which version of PHP. None-Thread Safe or Thread Safe, which one will you choose?
Final summary
1.Non Thread Safe (non-thread safe) version of php is suitable for web servers using CGI and fastCGI, such as nginx, lighttpd and IIS CGI mode
2. Thread Safe version of php is suitable for web servers using ISAPI or module, such as IIS ISAPI mode or apache module mode

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian

Does Bitcoin have stocks? Does Bitcoin have equity?

How To Set Up Visual Studio Code (VS Code) for PHP Development

deepseek What is the difference between r1 and v3 version

How do you parse and process HTML/XML in PHP?

PHP Program to Count Vowels in a String

What is the difference between pre-market and after-market trading? Detailed explanation of the differences between pre-market and after-market trading
