Home Backend Development PHP Tutorial PHP版本VC6跟VC9、Non Thread Safe和Thread Safe的区别

PHP版本VC6跟VC9、Non Thread Safe和Thread Safe的区别

Jun 13, 2016 pm 01:06 PM
fastcgi internet php SAFE thread

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 服务器上使用的 无知识产权的方法。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

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

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

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

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

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

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

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

CakePHP Creating Validators CakePHP Creating Validators Sep 10, 2024 pm 05:26 PM

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

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

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 Quick Guide CakePHP Quick Guide Sep 10, 2024 pm 05:27 PM

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.

How do you parse and process HTML/XML in PHP? How do you parse and process HTML/XML in PHP? Feb 07, 2025 am 11:57 AM

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

See all articles