You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm using an old version of phpseclib and it works fine for my requirements. However after an OS upgrade I've now started to get the following error:
Looking at old posts I can see this has been resolved, but my issue is I can't user composor to install the updated application.
I've read v2.0 will still allow manual installation, so I've copies the files to my server but then I get "PHP Fatal error: Uncaught Error: Class "Net_SSH2" not found"
The code I'm using to make the connection is $ssh = new Net_SSH2( $ipaddress );
Looking at Net/SSH/SSH2.php I can see the name has now changed to SSH2, so I changed my connection command to $ssh = new SSH2( $ipaddress ); but that gives error "PHP Fatal error: Uncaught Error: Class "SSH2" not found"
This is the example I'm currently using.
include('/Net/SSH2.php');
$ssh = new SSH2( $ipaddress );
if ( !$ssh->login( $user, $password ) ) {
exit('Login Failed<br/>');
}
Could some one help me get this working.
Thanks
The text was updated successfully, but these errors were encountered:
Apologies for the delay - I was out camping this weekend.
Looking at Net/SSH/SSH2.php I can see the name has now changed to SSH2, so I changed my connection command to $ssh = new SSH2( $ipaddress ); but that gives error "PHP Fatal error: Uncaught Error: Class "SSH2" not found"
Sounds like you're trying to use the latest code in the master branch when you should be using the latest code in the 2.0 branch:
How did you install phpseclib? phpseclib 2.0 requires the use of an auto loader. Like you shouldn't be needing to do include() on any phpseclib files. I mean, you could do so but, most likely, you'd have to painstakingly load all the dependencies as well (eg Math/BigInteger.php, Crypt/Rijndael.php, Crypt/Base.php, etc). And even if you were going to go that route, most likely, the Net directory is not installed in the root directory as include('/Net/SSH2.php'); would imply but, rather, is installed in the current working directory. ie. if you were going to include a file you'd prob be better off doing include('./Net/SSH2.php');
Hi,
I'm using an old version of phpseclib and it works fine for my requirements. However after an OS upgrade I've now started to get the following error:
"PHP Fatal error: Uncaught Error: Undefined constant "NET_SSH2_DISCONNECT_BY_APPLICATION""
Looking at old posts I can see this has been resolved, but my issue is I can't user composor to install the updated application.
I've read v2.0 will still allow manual installation, so I've copies the files to my server but then I get "PHP Fatal error: Uncaught Error: Class "Net_SSH2" not found"
The code I'm using to make the connection is
$ssh = new Net_SSH2( $ipaddress );
Looking at Net/SSH/SSH2.php I can see the name has now changed to SSH2, so I changed my connection command to
$ssh = new SSH2( $ipaddress );
but that gives error "PHP Fatal error: Uncaught Error: Class "SSH2" not found"This is the example I'm currently using.
Could some one help me get this working.
Thanks
The text was updated successfully, but these errors were encountered: