for the past few days i've been aching my brain on installing the SSH2 Connection on PHP.

My current setup is VC11 Non thread safe, which I have downloaded the appropriate zip folders on the PECL Website:http://windows.php.net/downloads/pecl/releases/ssh2/0.12/

With the exact file name of: php_ssh2-0.12-5.5-nts-vc11-x86.zip, fully aware of the differences of the versions I have double checked everything before downloading the files, PHP is as follows:

Compiler MSVC11 (Visual C++ 2012)

Architecture x86

PHPExtension Build API20121212,NTS,VC11

So, the correct files have been downloaded, I can confirm that they are located in the correct directory (C:\PHP\ext) and PHP.ini points to the correct folder.

Now, included in this compressed archive is




These have been placed in the correct folder and are existing. The extensions are correctly input into php.ini which follows:


extension=php_exif.dll ; Must be after mbstring as it depends on it



;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client

;extension=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant Client





But the problem arises after starting Microsoft IIS, functions appear to be undefined, so I resort to running C:\PHP\php.exe which returns the following errors:

Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_ssh2.dll' - The specified module could not be found. in Unknown on line 0

But prior to this message being shown.. This is presented to me:

The program can't start because the libssh2.dll is missing from your computer. Try reinstalling the program to fix this problem

There is no libssh2.dll presented in this zip document which is apparent in older versions of this extension, I have an older version from the 5.4 document in C:\WINDOWS\SYSTEM32, and registered with running:

C:>regsvr32 libssh2.dll

through command prompt.

Although, there is alternative libraries suggested on a number of questions/answers through out the stackoverflow library of questions on this case, i'm looking to avoid these libraries and install the extension correctly. Any advice which can be given

  • consider linux as a server ;) – Antony Gibbs Dec 2 '14 at 23:52

It is a bit of a late answer. Recently, I have encountered this issue with php 5.5.


  • Go to http://www.libssh2.org/ and download the libssh2.dll and put in php root directory.

  • Another option is to get one of php 5.4.* from here and libssh2 should be include in the zip file. Just copy it and it should be compatible to both php 5.4 and 5.5. Not sure why it is not included into php 5.5 though!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.