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

首先,我不是程序员。 我是一名networkingpipe理员,他被要求为我们的网页devise师编写PHP,并启用SSH2。

我一直在遵循这个步骤来编译用于Windows的PHP: https : //wiki.php.net/internals/windows/stepbystepbuild

为了编译,我正在使用:Microsoft Visual C ++ Studio 2008 Express Microsoft Windows SDK 6.1

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

它看起来像编译器没有find我已经添加的库。 任何帮助将不胜感激! 谢谢!

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

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 /快照,一些快照构建也可以找到)。

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

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

configure –disable-all –enable-cli –with-ss2 = shared

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

皮埃尔正在做一些构建,并使它们可以在这里: http : //downloads.php.net/pierre/ ,作为官方的地方正在工作。

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

无论如何,有一些版本的ssh2 ,只是CTRL + F在你的浏览器之后。

你缺少依赖关系,即libssh2 。 你将不得不先编译它,然后把include包含在lib路径和lib文件中。 对于PHP SDK,这分别是deps/libdeps/include

然后再次运行configure