开发者

Problems Compiling PHP with SSH2 pecl extension for Windows

开发者 https://www.devze.com 2023-03-19 09:24 出处:网络
First, I am not a programmer. I am a Network Admin who has been asked to compile PHP for our web designer with SSH2 enabled.

First, I am not a programmer. I am a Network Admin who has been asked to compile PHP for our web designer with SSH2 enabled.

I have been following this walk-through to compile PHP for Windows: https://wiki.php.net/internals/windows/stepbystepbuild

To compile, I am using: Microsoft Visual C++ Studio 2008 Express Microsoft Window开发者_高级运维s SDK 6.1

I have downloaded all mandatory libraries and libraries needed for SSH2. I have extracted and placed them in the 'deps' folder. I have also downloaded the SSH2 extension code and placed it in a 'pecl' folder I created in the 'x86' directory.

It looks like the compiler is not finding the libraries I have added. Any help would be greatly appreciated! Thank you!

Here are some of errors I get when attempting to compile using the following command:

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


For SSH2: (updated URL, we put all releases there, under pecl/snaps, some snapshots build can be found too).

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

For the error in your build, you are missing all default libs. But if all you want is ssh2, use:

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

(zts or nts may require the zts option as well)


Pierre is doing some builds and makes them available over here: http://downloads.php.net/pierre/, as the official place is being worked on.

If you need something specific, contact him on IRC: #php.pecl @ efnet. Usually he is willing to invest some time helping out with builds.

Anyway there are some builds for ssh2, just CTRL+F in your browser after it.


You're missing dependencies, namely libssh2. You will have to compile it first and then put the includes in the include path and the lib file in the lib path. For the PHP SDK, this are, respectively, deps/lib and deps/include.

Then run configure again.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号