如何在 IIS 7.5、Windows Server 2008 R2(64 位)中安装 PHP

发布于 2024-09-14 07:01:33 字数 448 浏览 2 评论 0 原文

http://windows.php.net/downloads 中,我找不到任何可供下载的 x64。 此外,我必须在“线程安全”和“非线程安全”之间进行选择,而没有解释一个是否比另一个更安全或者性能更好。可供下载的 ZIP 中的 install.txt 似乎已经过时,并且没有提及任何相关内容。

http://php.net/manual/pl/install.windows.iis7。 php 他们也没有说一句话...

另一个疑问是一旦我知道要下载什么(以及为什么),应该将其设置为 FastCGI 模块还是 ISAPI 扩展?

In http://windows.php.net/downloads I couldn't find any x64 built for download.
Further I have to choose among "Thread Safe" and "Non Thread Safe" with no explanation whether one is safer than the other or it performs better. The install.txt inside the available ZIPs for download seems out-dated an it doesn't mention anything about this.

In http://php.net/manual/pl/install.windows.iis7.php they don't say a word about it either...

Another doubt is once I know what to download (and why), should it be setup as a FastCGI module or as an ISAPI extension?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不喜欢何必死缠烂打 2024-09-21 07:01:33

(我在 IIS 下运行 PHP 的经验)

我相信您应该将 PHP 设置为 FastCGI 模块 - 我认为您无法将 PHP 设置为 ISAPI 扩展。 您可以设置 PHP使用 FastCGI 或 ISAPI - ISAPI 可能比 FastCGI 更快。这里有一个使用 ISAPI 设置 IIS 的指南:

搜索 google 会发现很多如果您想了解详细信息,请参阅讨论线程安全与非线程安全参数的页面,但简短的版本是非线程安全版本更快,但线程安全版本更安全。 您现在应该选择线程安全版本,除非您遇到性能问题并且知道您的应用将在非线程安全二进制文件下正确运行。

最后,当将 PHP 作为 FastCGI 应用程序运行时,实际上并不需要 x64 二进制文件 - php 作为单独的进程运行,因此 x86 二进制文件将在 x64 Web 服务器上正常运行,并且大多数普通 php 应用程序不需要就规模而言,超过 4GB 的地址空间 IIS 可以简单地启动额外的 php 进程。

配置 FastCGI 扩展时,您需要将其指向 php 安装目录中的 php-cgi.exe 可执行文件。

(My experiences running PHP under IIS)

I believe that you should set up PHP as a FastCGI module - I don't think you are able to set up PHP as an ISAPI extension. You can set up PHP either using FastCGI or ISAPI - It may be that ISAPI is faster than FastCGI. There is a guide on setting up IIS using ISAPI here:

Searching google reveals a lot of pages discussing the thread safe vs non thread safe argument if you want to know the detail, however the short version is that the non thread safe version is faster, but the thread safe version is safer. You should choose the thread safe version for now unless you have a performance problem and know that your app is going to run correctly under the non thread safe binaries.

Finally, there isn't really any need for x64 binaries when running PHP as a FastCGI application - php runs as a separate process and so the x86 binaries will run fine on a x64 web server, and most normal php applications will have no need for an address space above 4GB as to scale IIS can simply start additional php processes.

When configuring your FastCGI extension you need to point it at the php-cgi.exe executable in the php installation directory.

青瓷清茶倾城歌 2024-09-21 07:01:33

在 IIS 上设置 PHP 时,我经常使用 FastCGI。这更像是一种习惯。虽然我确实阅读了许多其他发布的文章,而且 ISAPI 确实有很多优点,但我想我应该为那些想要走这条路的人添加一个设置 FastCGI 的链接。我已经使用过它,并且从未遇到过中等请求流量的任何问题。

无论如何,这里有一篇文章的链接,其中包含有关在 IIS 7.5 上通过 FastCGI 设置 PHP 的屏幕截图。

单击此处访问该文章。

I often use FastCGI when setting up PHP on IIS. It is moreso habit than anything else. While I did read over many of the other articles posted and it does appear that ISAPI has many advantages I thought I'd add a link to setting up FastCGI for those who want to go that route. I've used it and never had any issues with moderate request traffic.

Anyway here's a link to an article with screenshots on setting up PHP via FastCGI on IIS 7.5.

Click here to visit the article.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文