Page 1 of 1

Can't get ssh2 to work in XAMPP

PostPosted: 01. October 2008 15:35
by calvincj
Hi guys,

I tried searching for this problem in the forum and it doesn't seem like this is a problem for anyone.

The issue is that I'm trying to enable ssh2 for php in XAMPP but it doesn't work. I tested by using this code:

Code: Select all
if (!function_exists("ssh2_connectcc")) die("function ssh2_connect doesn't exist");


It will always return false, the function doesn't exists. My understanding is that this is a build in function for php_ssh2.dll which I included in the php.ini file.

The php.ini file I changed was located in: C://xampp/apache/bin
I simply removed the ";" for the line "extension=php_ssh2.dll", saved the file and restarted the server. When I ran the check "function_exists" it still return false... Not sure what I missed.

Please help!

PostPosted: 01. October 2008 16:51
by Wiedmann
Code: Select all
if (!function_exists("ssh2_connectcc"))

My understanding is that this is a build in function for php_ssh2.dll which I included in the php.ini file.

The function "ssh2_connectcc" is not part of the SSH2-extension.

PostPosted: 01. October 2008 16:52
by glitzi85
You should use the correct function: http://de3.php.net/manual/en/function.ssh2-connect.php

PostPosted: 01. October 2008 21:03
by calvincj
Oh thanks, I didn't see that extra "cc". It works now, Thanks guys!