On Windows, I had trouble using ssh2_scp_send: files copied to a remote server where incomplete (truncated) and/or locked (error message : "access denied"). The back-end is also on Windows, using CopSSH (cygwin-based SSH server).
The SSH session was kept open - and the file were never flushed to disk.
There's a workaround though - make an explicit call to "exit" to close the session (flushing file content to disk):
<?php
$objConnection = ssh2_connect($strHost, $strPort, $methods, $callbacks);
ssh2_auth_password($objConnection, $strUser, $strPassword);
ssh2_scp_send($objConnection , $strSource, $strDest);
ssh2_exec($objConnection, 'exit');
?>