-2

I am not able to work with ss2_connect(). I have copied all libssh2.dll and php_ssh2.dll to php\ext folder also uncommented extension=php_ssh2.dll.

but getting Error Fatal error: Call to undefined function ssh2_connect() in C:\PHP\Code\linux.php on line 2 from below code. please help me its very urget.

jony
  • 1
  • 1

1 Answers1

0

checklogin.php  contents ::: 

<?php

// username and password sent from form
$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword'];
$result1=$myusername.$mypassword;
$result='rsahursahu';
if($result==$result1){
//header("location:emp.php");
header("location:linux.php");
//header("location:file_execute.php");
}
else {
echo "Wrong Username or Password";
}
?>


Linux.php contents::::

<?php
$connection = ssh2_connect('111.111.111.4', 22);
ssh2_auth_password($connection, 'oracle', 'oracle');
$stream = ssh2_exec($connection, 'ls');
?>
jony
  • 1
  • 1
  • what is your solution exactly ? you post some code with absolutly no comment on what to do with it – paris93 Feb 22 '18 at 15:15