php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58241 False warning using ssh2_scp_send()
Submitted: 2008-06-19 07:44 UTC Modified: 2013-02-18 00:35 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: ped7mendgou at hotmail dot com Assigned:
Status: No Feedback Package: ssh2 (PECL)
PHP Version: 5.2.5 OS: Ubuntu 8.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ped7mendgou at hotmail dot com
New email:
PHP Version: OS:

 

 [2008-06-19 07:44 UTC] ped7mendgou at hotmail dot com
Description:
------------
When i use ssh2_scp_send() to copy files it show me a warning saying that the file wasn't copied and the return value of the function is false but the file is truly copied. I tested if the file was really well copied by verifying his md5 hash code and the copy was successful, the file was well copied.   

Reproduce code:
---------------
<?
$connection = ssh2_connect('server', 22, array('hostkey'=>'ssh-rsa')) or die("N?o me consegui ligar!");

ssh2_auth_pubkey_file($connection, 'jpedro', '/home/jpedro/.ssh/id_rsa.pub', '/home/jpedro/.ssh/id_rsa','passphrase') or die("Falhou a auth!");

$original_filename = '/home/jpedro/Desktop/example.txt';
$destination_filename = 'example.txt';

ssh2_scp_send($connection, $original_filename, $destination_filename,0755);

?>

Expected result:
----------------
I expect that the file is copied and no error or warning should be shown.

Actual result:
--------------
Warning:  ssh2_scp_send() [function.ssh2-scp-send]: Failed copying file in /opt/lampp/htdocs/ligacao_ssh.php on line 24


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-10 14:10 UTC] mikesul@php.net
I can't reproduce this.

What version of libssh2 are you compiling against? If it's not 0.18 (or newer), please try that.

Please also try the latest release of the extension.
 [2009-02-08 09:51 UTC] mikesul@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2010-01-28 11:00 UTC] rebel29270 at orange dot fr
I have the same problem with net-libs/libssh2-1.2.2  USE="zlib -gcrypt"
on the sender's server.

im on gentoo and the problem is appening on only one type of my server ..

all works fine on others..
the othsers servers have the same software configuration ...

bye
 [2010-01-28 11:46 UTC] rebel29270 at orange dot fr
sorry ..

my version : 

SSH2 support	enabled
extension version 	0.11.0-dev
libssh2 version 	0.18
banner 	SSH-2.0-libssh2_0.18
remote forwarding 	enabled
hostbased auth 	enabled
polling support 	enabled
publickey subsystem 	enabled
 [2011-06-09 03:23 UTC] andries dot arijs at credimo dot be
Hi guys,

Is there allready a solution or workaround for this problem? I have exactly the same issue.

OS: Centos 5.5 (on Xen Virtual Server)
libssh2: 1.2.8
ssh2 extension: 0.11.2
 [2011-07-01 11:42 UTC] samm at os2 dot kiev dot ua
I can confirm this bug - i am having the same issue but in my case checksum is different. It fail only on one of the files and only on clients server (as usual). I can`t provide much more data because i have no root account on target server and sftp server itself is in internal network only :( Currently switching to http://phpseclib.sourceforge.net/ as bugaround.
 [2012-07-02 20:26 UTC] langemeijer@php.net
-Status: No Feedback +Status: Re-Opened -Assigned To: +Assigned To: langemeijer
 [2012-10-06 09:08 UTC] langemeijer@php.net
Could you give the latest TRUNK version a try? I've modified the ssh2_scp_send() 
code. It should be fixed, but if it's not, it is much more verbose about error 
situations than it previously was.
 [2012-10-16 19:07 UTC] langemeijer@php.net
-Status: Re-Opened +Status: Feedback -Assigned To: langemeijer +Assigned To:
 [2012-10-16 19:07 UTC] langemeijer@php.net
A new ssh2 package is released. Please see if problem still occurs.
 [2012-10-31 18:54 UTC] michael at smith-li dot com
I've experienced this issue with the versions of ssh2 on debian and redhat on Rackspace cloud, which are 0.11.0-2.1 and 0.11.0-7.el6 respectively. After upgrading using pecl to channel://pecl.php.net/ssh2-0.12 the problem appears resolved.
 [2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 06:01:29 2024 UTC