繁体   English   中英

使用 Windows 的 SSH2 pecl 扩展编译 PHP 时出现问题

[英]Problems Compiling PHP with SSH2 pecl extension for Windows

首先,我不是程序员。 我是一名网络管理员,他被要求为启用 SSH2 的 web 设计器编译 PHP。

我一直在按照这个演练为 Windows 编译 PHP: https://wiki.php.net/internals/windows/stepbystepbuild

要编译,我使用的是: Microsoft Visual C++ Studio 2008 Express Microsoft Windows SDK 6.1

我已经下载了 SSH2 所需的所有必需和库。 我已经提取并将它们放在“deps”文件夹中。 我还下载了 SSH2 扩展代码并将其放在我在“x86”目录中创建的“pecl”文件夹中。

看起来编译器没有找到我添加的库。 任何帮助将不胜感激! 谢谢!

以下是我在尝试使用以下命令进行编译时遇到的一些错误:

C:\php-sdk\php53dev\vc9\x86\php5.3-201107071830>configure --enable-cli --with-ss
h2

Checking for library libjpeg_a.lib;libjpeg.lib ... <not found>
WARNING: gd not enabled; libraries and headers not found

Checking for zlib.h ...  <not found>
Checking for zlib.h ...  <not found>
WARNING: zip not enabled; libraries and headers not found


Checking for library libiconv_a.lib ... <not found>
Checking for library libiconv.lib ... <not found>
Checking for library iconv_a.lib ... <not found>
Checking for library iconv.lib ... <not found>
WARNING: iconv support can't be enabled, libraries or headers are missing

Checking for library zlib_a.lib;zlib.lib ... <not found>
WARNING: zlib support can't be enabled, zlib is missing


Checking for library libssh2_a.lib;libssh2.lib ... <not found>
WARNING: ssh2 not enabled: libraries or headers not found

Checking for library libxml2_a_dll.lib;libxml2_a.lib ... ..\deps\libxml2-2.7.3.w
in32\lib\libxml2_a_dll.lib
Checking for library libiconv_a.lib;iconv_a.lib;libiconv.lib;iconv.lib ... <not
found>

WARNING: libxml support can't be enabled, iconv or libxml are missing

WARNING: simplexml not enabled; libraries and headers not found

WARNING: xml support can't be enabled, libraries or headers are missing

WARNING: dom support can't be enabled, libxml is not enabled

对于 SSH2:(更新了 URL,我们将所有版本都放在那里,在 pecl/snaps 下,也可以找到一些快照构建)。

http://windows.php.net/downloads/pecl/releases/ssh2/

对于构建中的错误,您缺少所有默认库。 但是,如果您想要的只是 ssh2,请使用:

配置 --disable-all --enable-cli --with-ss2=shared

(zts 或 nts 也可能需要 zts 选项)

Pierre 正在做一些构建并在此处提供它们: http://downloads.php.net/pierre/ ,因为官方位置正在开发中。

如果您需要特定的东西,请在 IRC 上与他联系:#php.pecl @ efnet。 通常他愿意花一些时间来帮助构建。

无论如何,有一些ssh2的构建,之后只需在浏览器中按 CTRL+F 即可。

您缺少依赖项,即libssh2 您必须先编译它,然后将包含文件放在包含路径中,将 lib 文件放在 lib 路径中。 对于 PHP SDK,这分别是deps/libdeps/include

然后再次运行configure

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM