Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems Compiling PHP with SSH2 pecl extension for Windows

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 Windows 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
like image 892
pat_micro Avatar asked Nov 05 '22 18:11

pat_micro


1 Answers

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)

like image 85
Pierre Avatar answered Nov 09 '22 14:11

Pierre