1

I am trying to install ssh2 on xampp

  • Xampp version : 3.2.1
  • PHP version : 5.4.19

Until now I have used following step to install:

  1. download and copied libssh2.dll file to c:\windows\system32

  2. php_ssh2.dll and php_ssh2.pdb files in the "ext" (e.g c:\xampp\php\ext) folder;

  3. remove ; from this line extention:php_ssh2.dll in php.ini.

  4. restart xampp

But I am getting error in log file:

unable to load dynamic library php_ssh2.dll

Can anyone help me with this?

gofr1
  • 15,741
  • 11
  • 42
  • 52
user3782114
  • 542
  • 2
  • 7
  • 22

1 Answers1

1

A couple of things you may have missed :-

  • You need the Thread Safe (-ts-) version of php_ssh2
  • You need to make sure you get the 32 or 64 bit version to match your PHP/Apache and not to match your OS
  • You need the version of php_ssh2 that matches your PHP version i.e. 5.4

Having a look here for the download there is only a 32bit version of SSH2 compiled with VC9 available for PHP5.4, so you will have to ensure you have the 32bit version of XAMPP installed.

Oh and a final note, you do not need, and should not do, the copy of php_ssh2.dll into the c:\windows\system32 so remove the dll from this folder. PHP knows where to load its extensions from and putting files in c:\windows\system32 will only confuse things when you want to upgrade your version of XAMPP.

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • RiggsFolly: Can you please let me know from where can I get libssh2.dll and php_ssh2.dll for Version: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.6 on x86 Architecture. On checking phpinfo.php, it shows me that OpenSSL is enabled. I am finding it hard to get proper dll. Tried many but none works for me. Any help will be appreciated. My ultimate objective is to connect to SFTP server and for that I have to enable SSH2, right ? – tejas033 Mar 02 '17 at 14:46
  • Is the link in the Answer not what you are looking for? – RiggsFolly Mar 02 '17 at 18:01
  • Yooo, thank you for the link! I was looking for the lib everywhere. – GTodorov Feb 26 '23 at 18:55