Though connection works ssh2_scp_send is not copying file (pdf).
To check connection I checked if source file is existent and I also tested and used successful:
- ssh2_sftp_mkdir
- ssh2_scp_recv
Here is my php code:
$my_sftp = parse_ini_file(config/sftp.ini.php');
$open_file = fopen($contract_pdf_path.$contract_pdf_name, 'r');
$destination = $my_sftp['sftp_root_to_dir'].'auftrag/'.$contract_pdf_name;
$connection = ssh2_connect($my_sftp['sftp_host'], $my_sftp['sftp_port']);
ssh2_auth_password($connection,$my_sftp['sftp_user'], $my_sftp['sftp_password']);
$sftp = ssh2_sftp($connection);
$result = ssh2_scp_send($connection, $contract_pdf_path.$contract_pdf_name, $destination, 0644);
I checked $result and got 1, as described I tested successful with other functions.
Anybody any idea?