惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

AI
AI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Google DeepMind News
Google DeepMind News
T
Tenable Blog
博客园_首页
S
Securelist
Spread Privacy
Spread Privacy
Google Online Security Blog
Google Online Security Blog
Forbes - Security
Forbes - Security
Engineering at Meta
Engineering at Meta
U
Unit 42
L
LINUX DO - 热门话题
量子位
T
Threat Research - Cisco Blogs
博客园 - 【当耐特】
C
Cyber Attacks, Cyber Crime and Cyber Security
K
Kaspersky official blog
MyScale Blog
MyScale Blog
P
Proofpoint News Feed
The Last Watchdog
The Last Watchdog
Google DeepMind News
Google DeepMind News
GbyAI
GbyAI
Martin Fowler
Martin Fowler
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Security Latest
Security Latest
Scott Helme
Scott Helme
V
Vulnerabilities – Threatpost
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
I
InfoQ
Know Your Adversary
Know Your Adversary
Cisco Talos Blog
Cisco Talos Blog
The Register - Security
The Register - Security
T
The Blog of Author Tim Ferriss
aimingoo的专栏
aimingoo的专栏
V2EX - 技术
V2EX - 技术
T
Tailwind CSS Blog
月光博客
月光博客
Recent Announcements
Recent Announcements
G
Google Developers Blog
F
Full Disclosure
W
WeLiveSecurity
宝玉的分享
宝玉的分享
腾讯CDC
G
GRAHAM CLULEY
Vercel News
Vercel News
Simon Willison's Weblog
Simon Willison's Weblog
美团技术团队
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Help Net Security
Help Net Security

博客园 - 涂文瀚

常用的前端调试工具 用户中心 - 博客园 SQL中动态进行行转列 SQL SERVER 表分区实施步奏 [记录]SQL SERVER 跨库操作小记 PHP常见面试问题 在WIN下搭建PHP的测试、开发环境 [转]三款免费的PHP加速器:APC eAccelerator XCache比较 PHP Cookbook读书笔记 – 第01章字符串 PHP Cookbook读书笔记 – 第03章日期和时间 PHP Cookbook读书笔记 – 第02章数字 PHP Cookbook读书笔记 – 第04章数组 PHP Cookbook读书笔记 – 第06章函数 PHP Cookbook读书笔记 – 第07章类和对象 PHP Cookbook读书笔记 – 第08章web基础 设计模式之观察者模式 PHP Cookbook读书笔记 – 第09章表单 PHP Cookbook读书笔记 – 第11章Session和持久化 PHP Cookbook读书笔记 – 第12章XML
Xdebug如何选择PHP版本
涂文瀚 · 2011-12-15 · via 博客园 - 涂文瀚

先上个图,来个看图不说话,大家通过这个图能看个大概

未标题-1

PHP从5.2.10开始,区分线程安全和非线程安全2个版本。我们就从这两个的区别说起。所谓线程安全(Thread Safe)就是执行时会进行线程安全检查,以防止有新请求时就启动新线程的CGI执行方式耗尽系统资源。非线程安全(None Thread Safe)就是在执行时不进行线程安全检查。

PHP在IIS上运行PHP有ISAPI和FastCGI两种形式(如果是wamp,运行方式是FastCGI)。FastCGI执行方式是以单线程来执行的,所以无需进行线程安全检查,IIS7集成了FastCGI,IIS6也支持,如果是采用FastCGI运行PHP,建议采用非线程安全(None Thread Safe)版本将获得更高的执行效率。

ISAPI执行方式是以DLL动态库的形式使用的,在处理完用的一个请求后不会立即消失,而是继续驻留内存等待处理别的用户请求,直到一段时间后没有用户请求。所以需要进行线程安全检查。安装肯定就是选择TS版本


VC6版本是采用Visual Studio6精心编译的,适合Apache架设的服务器

VC9版本是采用Visual Studio2008进行编译的,适合IIS假设的服务器


参考资料:

Difference between PHP thread safe and non thread safe binaries

CGI / FASTCGI / ISAPI 区别

php non-thread-safe与thread-safe

http://www.cnblogs.com/Excellent