PHP版本VC6跟VC9、Non Thread Safe和Thread Safe的区别
PHP版本VC6和VC9、Non Thread Safe和Thread Safe的区别
想更新个 PHP 的版本, PHP 的 windows 版本已经分离出来了,见 http://windows.php.net/download/ ,但是上面有很多不同的版本,包括 VC9, VC6, ?x86 Non Thread Safe, x86 Thread Safe, 好像没有 x64 版本的,(现在特别喜欢用 64 位的软件),版本有点多,主要的区别和如何选择不同的版本如下:
VC6 版本是使用 Visual Studio 6 编译器编译的,如果你是在 windows 下使用 Apache+PHP 的,请选择 VC6 版本。
VC9 版本是使用 Visual Studio 2008 编译器编译的,如果你是在 windows 下使用 IIS+PHP 的,请选择 VC9 版本。
Non Thread Safe
就是非线程安全,在执行时不进行线程(
Thread
)安全检查;
Thread Safe
是线程安全,执行时会进行线程(
Thread
)安全检查,以防止有新要求就启动新线程的
CGI
执行方式而耗尽系统资源;
Windows 下的 PHP 主要有两种执行方式: ISAPI 和 FastCGI 。
?????? ISAPI 执行方式是以 DLL 动态库的形式使用,可以在被用户请求后执行,在处理完一个用户请求后不会马上消失,所以需要进行线程安全检查,这样来提高程序的执行效率,所以如果是以 ISAPI 来执行 PHP ,建议选择 Thread Safe 版本;
?????? FastCGI 执行方式是以单一线程来执行操作,所以不需要进行线程的安全检查,除去线程安全检查的防护反而可以提高执行效率,所以,如果是以 FastCGI 来执行 PHP ,建议选择 Non Thread Safe 版本。
?????? 官方并不建议你将 Non Thread Safe 应用于生产环境。
?????
知识补充:
???? ? ISAPI 缩写词为 Internet Server Application Programming Interface 为 Microsoft 所提的 Internet server 的 API 。 ISAPI 服务器扩展是可以被 HTTP 服务器加载和调用的 DLL 。 Internet 服务器扩展也称为 Internet 服务器应用程序 (ISA) ,用于增强符合 Internet 服务器 API (ISAPI) 的服务器的功能。 ISA 通过浏览器应用程序调用,并且将相似的功能提供给通用网关接口 (CGI) 应用程序。
?????? FastCGI 是一个程序接口,它能加速公共网关接口( CGI ), CGI 是一种用最常见的方式使 Web 服务器调用应用程序的 Web 应用程序。按一个 FastCGI 工具来看,用户要求进入一个网站并使用一个专门的应用软件的话,使用 FastCGI 能够快 3 到 30 倍。 FastCGI 是 Web 服务器的一种 插件。为了获得良好的性能,它要求对现有服务器应用程序(比如 Perl 、 Tcl 脚本和 C 、 C++ 程序)做细小的改动。
???? 基本上, FastCGI 是一个在单一步骤中管理多重 CGI 请求的程序,为每个请求减少了许多程序指令。没有 FastCGI 的话,每当用户请求某一服务时都会导致 Web 服务器打开 一个新的能控制和执行这项服务的程序,然后关闭它。有了 FastCGI 的话,一个步骤的耗费会被所有当前正处理的请求所分担。与 CGI 不同,有了 FastCGI 的话,每个步骤是独立于 Web 服务器运行的, 这样就提供了更多的安全。 FastCGI 是独立代码的。它的版权属于 Open Market 公司,该公司提供 FastCGI 的免费使用并且将其作为一个公开标准。 FastCGI 提供了唯一一个可以跨平台和在任何 Web 服务器上使用的 无知识产权的方法。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

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 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Validator can be created by adding the following two lines in the controller.

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

CakePHP is an open source MVC framework. It makes developing, deploying and maintaining applications much easier. CakePHP has a number of libraries to reduce the overload of most common tasks.

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an
