PHP5.3的VC9、VC6、Thread Safe、Non Thread Safe的区别
本文章来给各位同学介绍关于在PHP5.3的VC9、VC6、Thread Safe、Non Thread Safe的区别哦,这个大部份朋友都不知道,我来普及一下。
PHP5.3的VC9、VC6、Thread Safe、Non Thread Safe的区别
PHP一共给了四个版本,VC9 x86 Non Thread Safe、VC9 x86 Thread Safe、VC6 x86 Non Thread Safe、VC6 x86 Thread Safe,这让我这个菜鸟头疼啊,还好 PHP 官网提供下载的地方左边有个英文 choose 我看懂了,我估摸着就是如何来选择版本的意思吧,于是开始查字典及上网查找,终于看明白了具体意思,拿来做个备忘先。
一、如何选择 PHP5.3 的 VC9 版本和 VC6 版本
VC6 版本是使用 Visual Studio 6 编译器编译的,如果你的 PHP 是用 Apache 来架设的,那你就选择 VC6 版本。
VC9 版本是使用 Visual Studio 2008 编译器编译的,如果你的 PHP 是用 IIS 来架设的,那你就选择 VC9 版本。
二、如何选择 PHP5.3 的 Thread Safe 和 Non Thread Safe 版本
先从字面意思上理解,Thread Safe 是线程安全,执行时会进行线程(Thread)安全检查,以防止有新要求就启动新线程的 CGI 执行方式而耗尽系统资源。Non Thread Safe 是非线程安全,在执行时不进行线程(Thread)安全检查。
再来看 PHP 的两种执行方式:ISAPI 和 FastCGI。
ISAPI 执行方式是以 DLL 动态库的形式使用,可以在被用户请求后执行,在处理完一个用户请求后不会马上消失,所以需要进行线程安全检查,这样来提高程序的执行效率,所以如果是以 ISAPI 来执行 PHP,建议选择 Thread Safe 版本;
FastCGI执行方式是以单一线程来执行操作,所以不需要进行线程的安全检查,除去线程安全检查的防护反而可以提高执行效率,所以,如果是以 FastCGI(无论搭配 IIS 6 或 IIS 7)执行 PHP ,都建议下载、执行 non-thread safe 的 PHP (PHP 的二进位档有两种包装方式:msi 、zip ,请下载 zip 套件)。
而线程安全检查正是为ISAPI方式的PHP准备的,因为有许多php模块都不是线程安全的,所以需要使用Thread Safe的PHP。
所以,对于PHP5.2选择Thread Safe版本安装,而对于PHP5.3则下载None-Thread Safe,执行PHP比较有效率。

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

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

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.

In this chapter, we are going to learn the following topics related to routing ?

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

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

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