which PHP thread-safe and non-thread-safe editions should be used, and what are their respective usage scenarios?
Reply content:
which PHP thread-safe and non-thread-safe editions should be used, and what are their respective usage scenarios?
PHP
The introduction of the Thread Safe
main target is the Windows
next to IIS
run PHP
the situation, because Windows
the frequent application process overhead, so in the Windows
multi-threaded way to operate, this time PHP
need Thread Safe
version. Under the Linux
system, PHP
Most of the cases are run in multi-process mode, so it can be used directly None Thread Safe
.
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.
Reason:
http://astar.baidu.com/forum/forum.php?mod=viewthread&tid=366
If there are multiple threads, use the thread-safe version;
If there is only one thread, use a non-thread-safe version.