什么是线程安全的,非线程安全的PHP的Windows安装包之间的技术区别是什么? [英] What are the technical differences between the Thread Safe and Non Thread safe PHP Windows Installation Packages?

查看:235
本文介绍了什么是线程安全的,非线程安全的PHP的Windows安装包之间的技术区别是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前安装PHP一个基于Windows的Apache /开发环境,但似乎我即将在今秋的第一关:选择正确的包安装

I'm currently about to install PHP for an Apache/Windows-based development environment, but it seems I'm about to fall at the first hurdle: Choosing the right package to install.

PHP在不下的的口味的:


  • VC9非x86的线程安全

  • VC9 x86的线程安全

  • VC6 86非线程安全

  • VC6 x86的线程安全

有什么在这些版本之间的差异的实际的意义吗?

What's the difference between these versions in a practical sense?

如果这还不够复杂,PHP的5.3版仅在VC9可用(5.2与VC6包推出)。然而,根据PHP的网站,你应该的不可以使用VC9与Apache ...那么,为什么阿帕奇获得旧版本?

If this wasn't complicated enough, version 5.3 of PHP is only available in VC9 (with 5.2 coming with the VC6 packages). And yet, according to the PHP site, you should not use VC9 with Apache... So why does Apache get the older version?

这一切都非常混乱,我想一些帮助理解的选择。

It's all very confusing and I'd like some help understanding the choices.

推荐答案

大量的调查研究后,我设法找到了我自己回答这个问题。

After a lot of research, I've managed to find my own answers to this question.

在其最基本的形式,答案是: 来自哪个版本的PHP你应该安装下来你正在运行的web服务器

In its most basic form, the answer is: What version of PHP you should install comes down what webserver you are running.

下面是在挑选依据是什么,我学到了版本的PHP中使用的术语更深入的解释:

Here's a deeper explanation of the terms used in picking a version of PHP based on what I learned:

首先,针对Windows不同版本的Apache是​​编译不同的编译器。例如,在 Apache.org 版本的目的是使用的微软的Visual C ++ 6 进行编译,也被称为 VC6 。这个编译器很流行,也很老了。 (它的历史可以追溯到1998年。)

Firstly, different versions of Apache for Windows are compiled with different compilers. For example, the versions on Apache.org are designed to be compiled using Microsoft Visual C++ 6, also known as VC6. This compiler is very popular, but also very old. (It dates back to 1998.)

有不同的编译器制作不同版本的Apache。例如,从 ApacheLounge.com 的可供下载的版本被设计为与流行的和更多的最近的编译器进行编译,<自2008年也被称为 VC9 STRONG>微软的Visual C ++ 9 。

There are different versions of Apache made for different compilers. For example, the versions available for download from ApacheLounge.com are designed to be compiled with the popular and more much recent compiler, Microsoft Visual C++ 9 from 2008. Also known as VC9.

(注意:这两种编译器是两个最流行的选择因此,尽管它可能有一个VC7,VC8等的Apache的编译版本,这是不可能的,你会遇到他们)

(Note: These two compilers are the two most popular options. So while it's possible to have a VC7, VC8, etc. compiled version of Apache, it's unlikely that you'll come across them.)

使用这种更近的编译器(VC9)是重要的,因为PHP的最新版本只被分布在VC9形式(虽然老版本仍然可用于VC6)。

The use of this more recent compiler (VC9) is important because the latest versions of PHP are only being distributed in VC9 form (although older versions are still available for VC6).

在最重要的是,根据ApacheLounge像性能,MemoryManagement和稳定性方面不存在使用与VC9编译Apache版本时,许多改进。

On top of that, according to ApacheLounge there are numerous improvements when using a version of Apache compiled with VC9, "in areas like Performance, MemoryManagement and Stability".

如果这还不够,PHP的开发者在其网站上发表声明如下:

If that wasn't enough, the developers of PHP made the following statement on their site:

Windows用户:请记住,我们做的
  不再提供建立与创建
  Visual Studio的C ++ 6(VC6)。它是
  不可能保持高品质
  和PHP的安全生成的Windows
  使用这种无人维护的编译器。

Windows users: please mind that we do no longer provide builds created with Visual Studio C++ 6 (VC6). It is impossible to maintain a high quality and safe build of PHP for Windows using this unmaintained compiler.

我们建议VC9 Apache生成的
  通过ApacheLounge提供

所有的PHP用户应注意的是,PHP
  5.2系列已不再支持。所有的用户都强烈建议
  升级到PHP 5.3.6。

All PHP users should note that the PHP 5.2 series is NOT supported anymore. All users are strongly encouraged to upgrade to PHP 5.3.6.

在所有的,这是使用Apache和PHP的版本VC9,如果你问我一个非常有说服力的论据。

In all, this is an extremely compelling argument to use VC9 versions of Apache and PHP, if you ask me.

所以,如果你正在使用从 Apache官方网站,它会用VC6编译,因此,你应该使用PHP的旧版本,该编译器。如果您使用的是Apache版本与VC9编译,像 ApacheLounge.com 中的一个可用的,你可以使用最新的版本的PHP(用于VC9)。

So if you're using a version of Apache from the official Apache site, it will be compiled with VC6, and as such, you should use the older version of PHP for that compiler. If you're using a version of Apache compiled with VC9, like the one available on ApacheLounge.com, you can use the latest version of PHP (for VC9).

对于我来说,运行的本地开发环境,这将是preferable拥有最新版本的PHP,所以需要的Apache VC9版本,所以我可以使用PHP的VC9版本。

For me, running a local development environment, it would be preferable to have the latest version of PHP, so a VC9 version of Apache is required, so I can use the VC9 version of PHP.

这再一次归结到Web服务器。默认情况下安装的Apache在Windows上为模块,但它可以改变运行为的FastCGI 。有大量的两个之间的差异,但本质上是FastCGI的更现代,更快速,更强劲,更耗资源。有人运行的本地开发环境,FastCGI的可能是矫枉过正,但显然很多托管公司作为运行的FastCGI我所陈述的理由,所以有在开发环境中这样做很好的理由。

Once again this comes down to your webserver. By default Apache is installed on Windows as Module, but it can be changed to run as FastCGI. There's plenty of differences between the two, but essentially FastCGI is more modern, faster, more robust, and more resource hungry. For someone running a local development environment, FastCGI might be overkill, but apparently lots of hosting companies run as FastCGI for the reasons I've stated, so there are good arguments for doing so in a development environment.

如果你正在运行的Apache(或IIS)作为FastCGI的(或CGI),那么你需要在非线程安全的PHP版本。如果你正在运行的Apache为默认(作为一个模块),那么你会希望更传统的线程安全版本。

If you're running Apache (or IIS) as FastCGI (or CGI) then you want the Non Thread Safe version of PHP. If you're running Apache as default (as a Module), then you'll want the more traditional Thread Safe version.

请注意:这一切都仅适用于Windows用户

Please note: This all only applies to Windows users.

我不打算与FastCGI的打扰(除非有人说服我,否则),所以对我来说,我想在 VC9线程安全的PHP版本

I'm not going to bother with FastCGI (unless someone convinces me otherwise), so for me, I want the VC9 Thread Safe version of PHP.

就是这样。

延伸阅读:

  • Official statement regarding PHP and VC6
  • Difference between PHP thread safe and non thread safe binaries
  • FastCGI at Wikipedia
  • FastCGI for IIS
  • Visual C++ at Wikipedia
  • Compile your own PHP (explanation of VC6/VC9)

这篇关于什么是线程安全的,非线程安全的PHP的Windows安装包之间的技术区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆