php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59106 ssh2_scp_send's bug
Submitted: 2010-03-10 09:14 UTC Modified: 2012-06-14 21:19 UTC
From: michael-139 at hotmail dot com Assigned:
Status: Duplicate Package: ssh2 (PECL)
PHP Version: 5.3.0 OS: linux
Private report: No CVE-ID: None
 [2010-03-10 09:14 UTC] michael-139 at hotmail dot com
Description:
------------
i just got the same problem.
and i modify the function ssh2_scp_send.
i make it resume sending when it breaks,

it works.cause the socket is block.

anyone who need it.send me a email.

Reproduce code:
---------------
if ( bytesread !=  libssh2_channel_write(remote_file, buffer , bytesread) ) ) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed copying file");
php_stream_close(local_file);
libssh2_channel_free(remote_file);
RETURN_FALSE;
}


Expected result:
----------------
bytesread ==  libssh2_channel_write(remote_file, buffer , bytesread)

Actual result:
--------------

bytesread <libssh2_channel_write(remote_file, buffer , bytesread)

it breaks and report a warning where send a large file.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-14 21:19 UTC] langemeijer@php.net
This is a duplicate of bug #56425.

Solution is similar to the patch committed in SVN
 [2012-06-14 21:19 UTC] langemeijer@php.net
-Status: Open +Status: Duplicate
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 05:01:30 2024 UTC