1

I am using ssh2_scp_send() function to send files on my server. small file with size(less than 10mb) I am able to send successfully but if the file size is greater than 10 mb then it is giving error :

ssh2_scp_send(): Failed copying file in (...)

and file is not going on server. is there any configuration variable I need to change?

Ganesh Patil
  • 670
  • 1
  • 5
  • 22
  • Does the scp work for >10Mb files if you do it at the command line, not via PHP? – madebydavid Sep 01 '14 at 14:53
  • Any particular reason you're using SCP instead of SFTP? If not then does it work with SFTP? – neubert Sep 01 '14 at 15:45
  • @madebydavid : Yes, SCP work for >10mb files through command line. – Ganesh Patil Sep 02 '14 at 06:19
  • @neubert : I want to make file transfer secure because of that reason I am using SCP.as > 10mb file is not transferring using ssh2_scp_send()function then I am using fwrite() to transfer file with "ssh.sftp" protocol in following ways: $sftpStream = fopen("ssh2.sftp://filepath, 'w'); //open destination file and then writing content in to above file using fwrite(sftpStream,$contents). using fwrite(),I am able to send file which has size more than 10mb as well. just want to confirm is that secure File transfer over SCP? thank you. – Ganesh Patil Sep 02 '14 at 07:08
  • check your PHP Ssh2 extention version.libssh2 version 1.7.0 is ok. I met this problem when libssh2's version is 1.2.2. – user1640080 Jun 28 '16 at 02:50

0 Answers0