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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
50 + 22 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Thu Apr 18 16:01:29 2024 UTC