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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 涂文瀚

常用的前端调试工具 如何在IIS7(WIN2008)中部署你的MVC网站 - 涂文瀚 SQL中动态进行行转列 SQL SERVER 表分区实施步奏 [记录]SQL SERVER 跨库操作小记 PHP常见面试问题 在WIN下搭建PHP的测试、开发环境 [转]三款免费的PHP加速器:APC eAccelerator XCache比较 PHP Cookbook读书笔记 – 第01章字符串 PHP Cookbook读书笔记 – 第02章数字 PHP Cookbook读书笔记 – 第03章日期和时间 - 涂文瀚 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