-1

I am trying to get php_ssh2.dll working on my IIS 7.5 server. I have PHP 5.5.4 installed and running (NTS VC11 x64). I downloaded php_ssh2.dll from here: http://windows.php.net/downloads/pecl/releases/ssh2/0.12/php_ssh2-0.12-5.5-nts-vc11-x64.zip

I placed the extension and the pdb file in the ext folder of my PHP install and enabled it in IIS. The problem is when I restart IIS, I get the following in my error log:

    PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\5.5.4\ext\php_ssh2.dll' - %1 is not a valid Win32 application. in Unknown on line 0

I also have PHP 5.3 installed with php_ssh2.dll (not the same as linked above) and it works fine.

I do have libssh and openssl installed, as well as Visual C++ 2012 x64. Is there some other step I'm missing?

Minor update, I tried doing everything above with the x86 builds instead and had the same results. PHP itself runs fine, but I cannot utilize the php_ssh2.dll

neubert
  • 15,947
  • 24
  • 120
  • 212
David Legatt
  • 336
  • 4
  • 17

2 Answers2

0

It appears the issue is that the 5.5x builds of the php_ssh2.dll lack the libssh2.dll, per this bug report: http://www.phplt.com/2013/09/17/17/php_ssh2-0-12-5-5-nts-vc11-x86-zip-missing-file/ Is this something I can build or acquire elsewhere?

David Legatt
  • 336
  • 4
  • 17
-1

What are you trying to do with php_ssh2.dll? Maybe phpseclib, a pure PHP SSH2 implementation, would work better for you?

neubert
  • 15,947
  • 24
  • 120
  • 212
  • I did try phpseclib, it wasnt working for me, or at least, I couldnt get it to work with the given documentation. I am trying to use php_ssh2 to connect to a firewall and then export the configuration file. The problem is that the firewall does not do a standard SSH login. You connect to the firewall, username is unimportant, and then it presents you with a login prompt of its own. – David Legatt Oct 15 '13 at 15:18
  • 1
    Maybe post a separate question for the phpseclib issues you were having? Even assuming you can get libssh2 installed there's no guarantee it'll connect to your server. So might as well take a two pronged approach I figure - try to get libssh2 installed and try to figure out why phpseclib isn't working. – neubert Oct 15 '13 at 15:29
  • I know php_ssh2 works for what I need, as I stated above, my configuration works fine with PHP v5.3.x. I cannnot find a working build of php_ssh2 for 5.5x on IIS. This is what I am trying to resolve. – David Legatt Oct 15 '13 at 15:31