php - Fatal error: Call to undefined function ftp_ssl_connect() or ssh2_sftp() -


i trying set ftp using ssl connection in php. try use ftp_ssl_connect() , ssh2_sftp() got error :

fatal error: call undefined function ftp_ssl_connect()

fatal error: call undefined function ssh2_connect()

i have openssl extension turned on in php extentions.

array ( [0] => php 1 => file 2 => glob [3] => data [4] => http [5] => ftp [6] => zip [7] => compress.zlib [8] => compress.bzip2 [9] => https [10] => ftps [11] => phar )

here's simple code here :

$conn_id = ftp_ssl_connect($ftp_server);  $ftp_user_name = "username";  $ftp_user_pass = "password";  $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);   ftp_pasv($conn_id, true);  if ((!$conn_id) || (!$login_result)) {      echo "ftp connection has failed!";      echo "attempted connect $ftp_server user $ftp_user_name";      exit;  } else {      echo "connected $ftp_server, user $ftp_user_name";  } 

and ssh2 here :

$connection = ssh2_connect('shell.example.com', 22); ssh2_auth_password($connection, 'username', 'password');  $sftp = ssh2_sftp($connection); 

i'm using xampp, php 5.6.31 in windows 10 , mac os x. both os, got same error. here wants me how fix ?


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -