title: Files sent with ssh2_scp_send() are incomplete on remote server
body: <p>I transfer files with PHP and SSH2 to an remote server.</p>
  
  <p>I use this:</p>
  
  <pre><code>$connection = ssh2_connect('shell.example.com', 22);
  ssh2_auth_password($connection, 'username', 'password');
  ssh2_scp_send($connection, '/local/filename', '/remote/filename', 0644);
  </code></pre>
  
  <p>But sometimes the file on the remote server is incomplete. I have the assumption that SSH2 doesn't transfer the EOF or anything else.</p>
  
  <p>Do you have any ideas or solutions?</p>