php 适用于 Windows 的 PECL 扩展
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2048309/
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
PECL extension for Windows
提问by Varun
I found a few related posts here but didn't get my answer. So posting again.
How would I install a PECL extension on windows? Say I want the PECL oAuth extension on Windows XP.
I know 2 methods, but none of them is working for me.
我在这里找到了一些相关的帖子,但没有得到我的答案。所以又发帖了。
如何在 Windows 上安装 PECL 扩展?假设我想要 Windows XP 上的 PECL oAuth 扩展。
我知道 2 种方法,但它们都不适合我。
The site http://pecl4win.php.net/is down for months. So I cant download the DLL. Is there any place we can download the DLLs from ?
running the command pecl install oauth-0.99.9.tgzis throwing the error
The DSP oauth.dsp does not exist.
I tried with few other extensions also and getting the same error.
网站http://pecl4win.php.net/已关闭数月。所以我不能下载DLL。有什么地方可以下载 DLL 吗?
运行命令 pecl install oauth-0.99.9.tgz抛出错误
DSP oauth.dsp 不存在。
我也尝试了一些其他扩展并得到相同的错误。
What am I missing here?
我在这里缺少什么?
回答by johannes
Releases can now be found here:
http://windows.php.net/downloads/pecl/releases/
现在可以在这里找到版本:http:
//windows.php.net/downloads/pecl/releases/
If you need an extension not available there you might ask on the pecl-dev at lists.php.net mailing list.
如果您需要的扩展程序在那里不可用,您可以在 pecl-dev 的 list.php.net 邮件列表中询问。
回答by Erwin Kaddy
I got what I am looking for in http://windows.php.net/downloads/pecl/releases/
回答by Kevin Peno
Currently PECL for windows is in an odd reformation state. The reason being that I believe they are trying to provide VS2008 source versions. I would actually suggest using Zend Serverfor now until the windows half of the php group gets everything fixed up. Zend Serverincludes almost all of the extensions that you can find in PECL, and everything else, if you are lucky, you could find an compile yourself.
目前,Windows 的 PECL 处于一种奇怪的改革状态。原因是我相信他们正在尝试提供 VS2008 源版本。我实际上建议现在使用Zend Server,直到 php 组的 windows 一半得到修复。Zend Server包含几乎所有您可以在 PECL 中找到的扩展,以及其他所有扩展,如果您幸运的话,您可以自己找到一个编译器。
回答by álvaro González
The PECL installer downloads the source code of the extension and tries to compile it with your local C compiler. The problem is that the whole process is designed for Unix systems, where a C compiler is available or can be easily installed. Setting an environment to compile C code under Windows is pretty complicate.
PECL 安装程序下载扩展的源代码并尝试使用本地 C 编译器对其进行编译。问题是整个过程是为 Unix 系统设计的,在那里可以使用 C 编译器或可以轻松安装。在 Windows 下设置编译 C 代码的环境非常复杂。
The ideal solution is getting a DLL file that someone already compiled. That's what the pcle4win site was for. However, there's currently no official repository to download PECL DLLs so you only have two alternatives:
理想的解决方案是获取某人已经编译的 DLL 文件。这就是 pcle4win 站点的用途。但是,目前没有下载 PECL DLL 的官方存储库,因此您只有两种选择:
- Find an unofficial DLL somewhere in Google
- Compile it yourself(another link) with Microsoft Visual Studio
It'd be cool that there was a DLL repository out there but I'm unaware of any.
那里有一个 DLL 存储库会很酷,但我不知道任何。
回答by VolkerK
The php source ships with a set of configuration scripts for windows (using windows script host) that mimics the autoconf tools as far as php is concerned. If you place the code for the extension in a directory under the /ext directory (where all the other extensions like bcmath, bzip, ... are located) you can let the buildconf-script create a makefile that includes the build rules for that (new) extension.
There's a step-by-step walk-through at http://wiki.php.net/internals/windows/stepbystepbuildwhich seems to be brief but feasible.
php 源代码附带了一组 windows 配置脚本(使用 windows 脚本主机),就 php 而言,它们模仿了 autoconf 工具。如果您将扩展的代码放在 /ext 目录下的目录中(所有其他扩展,如 bcmath、bzip 等),您可以让buildconf-script 创建一个包含构建规则的 makefile(新)扩展名。http://wiki.php.net/internals/windows/stepbystepbuild上
有一个分步演练,这似乎很简短但可行。
回答by ewwink
compiled oauth: http://windows.php.net/downloads/pecl/releases/oauth/
编译的 oauth:http: //windows.php.net/downloads/pecl/releases/oauth/
another pecl extension: http://windows.php.net/downloads/pecl/releases/
另一个 pecl 扩展:http: //windows.php.net/downloads/pecl/releases/

