如何在 Windows 上启用 PHP HTTP PECL 扩展?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2100066/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I enable the PHP HTTP PECL extension on Windows?
提问by Amir Khawaja
I have an installation of XAMPP version 1.7.3 on Windows 7 x64. I want to enable the PHP HTTP extension. How do I go about doing so? That is, where to I get the DLL, register it, etc. Thanks in advance.
我在 Windows 7 x64 上安装了 XAMPP 1.7.3 版。我想启用PHP HTTP 扩展。我该怎么做?也就是说,我可以从哪里获取 DLL、注册它等。提前致谢。
采纳答案by silent
First, download the PECL module from the php website.
首先,从 php 网站下载 PECL 模块。
Then unzipp it and copy the file php_http.dll in your PHP extension folder. Then edit your php.ini file (c:\WINDOWS\php.ini) and activate the module :
然后解压它并将文件 php_http.dll 复制到您的 PHP 扩展文件夹中。然后编辑您的 php.ini 文件 (c:\WINDOWS\php.ini) 并激活模块:
extension=php_http.dll
回答by Dave Goodchild
As you are on an earlier PHP Version, you can get the build from: http://downloads.php.net/pierre/
由于您使用的是较早的 PHP 版本,因此可以从以下位置获取构建:http: //downloads.php.net/pierre/
If you upgrade to XAMPP 1.8.3, which uses PHP 5.4, then you should take a look at the closed bug about this found at: bugs.php.net/bug.php?id=62056
如果您升级到使用 PHP 5.4 的 XAMPP 1.8.3,那么您应该查看有关此问题的已关闭错误:bugs.php.net/bug.php?id=62056
As per details in the bug comments; I downloaded the ts (thread safe) version for XAMPP 1.8.3 from github.com/stealth35/stealth35.github.com/downloadsand listed as "php_http-1.7.4 -5.4-vc9-x86.zip"
根据错误评论中的详细信息;我从github.com/stealth35/stealth35.github.com/downloads下载了 XAMPP 1.8.3 的 ts(线程安全)版本,并列为“php_http-1.7.4 -5.4-vc9-x86.zip”
The latest builds can be found at: windows.php.net/downloads/pecl/releases/http/1.7.5/
最新版本可以在以下位置找到:windows.php.net/downloads/pecl/releases/http/1.7.5/
Amoung those links you should find a version specifically for what you need.
在这些链接中,您应该找到一个专门满足您需要的版本。