OK, There have been a TON of fuzzy instructions on the innertubes and intrawebs concerning the exact way to install SSH2 on Windows systems. From: it can't be done, to instructions on recompiling SSH2 from source, to telling you to try the bell/book/candle route.
Well, While I can not discuss a solution to ALL the permutations, I CAN comment on my own.
Given:
Windows 8.1, 64bit
WAMPServer Version 2.5 (64 bit) with PHP 5.5.12 and Apache 2.4.9 (As delivered by the WAMPServer 64 bit package)
1. Stop all services on the WAMPServer (console)
2. Go to: [
pecl.php.net] and download the '5.5 Thread Safe (TS) x64' file (Which stands for PHP 5.5, Thread Safe, 64 bit) and unpack it somewhere convienent.
3. The folder contains 4 files. This is how you deploy them:
a. License: Read it, love it, chant it to yourself... whatever (Or toss it)
b. php_ssh2.dll place this here: C:\wamp\bin\php\php5.5.12\ext (If you have set up the WAMPServer somewhere else, gods help ye... just aim for the ext folder. For other references to file locations... use a good guess)
c. libssh2.dll place this here: C:\wamp\bin\php\php5.5.12 and here C:\wamp\bin\apache\apache2.4.9\bin
d. stick the php_ssh2.pdb file next to the php_ssh2.dll file. Can't hurt
4. Time to Edit the php.ini files (Yes, FileS)
a. If you want to use the server & PHP, edit the PHP.ini file from the WAMPServer console (WampServer >> PHP >>php.ini
b. If you want to use PHP from the CLI (Command Line) edit the one here:C:\wamp\bin\php\php5.5.12
c. If you want to do both... well... edit both (STRONGLY RECOMMENDED)
To edit, open the ini(s) and look for a group of lines that begin with extension= and add the following line: extension=php_ssh2.dll right after the last one in the list (First, check to ensure that you do not already have it, perhaps commented out, like so: ';extension=php_ssh2.dll' in that case, simply remove the ';' when done, save the file(s)
5. Start all WampServer services.
6. with the WAMPServer console, go here: WampServer >>PHP >> PHP extensions. Check the list for PHP_SSH2. If it is there, and checked... good. If it is there and not checked, click the entry... it should check itself. If it is there, but has a danger symbol ( [
www.dropbox.com] ) then you missed something... take another look.
when you get the happy check, time to make sure it all works.
1. Restart all services
2. Place the server online
3. Go to localhost (You DO have the index.php file there still I hope)
4. On the main screen, under extensions, look for ssh2 ( [
www.dropbox.com] )
5. In tools, click phpinfo(). since this is flippin ginormous, use cntl-f to hunt for ssh2. You SHOULD come to this: [
www.dropbox.com]
Which means you are done.
Woo Hoo
Edited 1 time(s). Last edit at 03/09/2015 08:19PM by everseeker.