php - Issue with JPG file transfer with ssh2_scp_send -


we sending image files 1 server another. use ssh2 library of php.

when send png images, work fine when send jpeg or txt file create file on server file size 0 kb.

anyone have idea issue?

could lack of permissions? ssh server may sending error messages without knowing it'd hard figure out issue is.

my recommendation: use phpseclib, pure php ssh implementation, , post logs. ie.

<?php include('net/sftp.php');  define('net_sftp_logging', net_sftp_log_complex);  $sftp = new net_sftp('www.domain.tld'); if (!$sftp->login('username', 'password')) {     exit('login failed'); }  // puts three-byte file named filename.remote on sftp server $sftp->put('filename.remote', 'xxx');  echo $sftp->getsftplog(); ?> 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -