I'm working with ssh2, and when i try to send file to remote machine all it's good!!!!
But when i tired to receive a remote file from my server the browser print this message:
"Warning: ssh2_scp_recv(): Unable to receive remote file"
why this happen??? if i goal to upload file, i must also download!!!!!!
ps: the ssh account is funcionally and i have full permission on file!!!!!
Code: Select all
$connection = ssh2_connect('XXX.XXX.XXX.XXX', 22);
if (ssh2_auth_password($connection, 'dfoiwcbdios', 'XXXXXXXX')) {
echo "Authentication Successful!\n";
}
else {
die('Authentication Failed...');
}
$stdout_stream= ssh2_scp_recv($connection,'C:\TEST.XML','C:\prova.txt');
//echo $stdout_stream;
//ssh2_scp_send($connection, 'C:\Documents and Settings\Utente\Desktop\coccobiwi.txt','C:\coccobiwi.txt');