doudu2404 2013-11-28 01:59
浏览 363

ssh2_scp_send第一次没问题,但第二次失败了

I am making use of php ssh2_scp_send to transfer files to the remote machine, but it is a bit weird, it works for the first time but fails my second call with the following error

//success for file transfer
if (!(ssh2_scp_send($this->conn, $lpath, $rpath, 0777))){
            throw new Exception("File transfer failed!");
        }
        ssh2_exec($this->conn, 'exit'); 

//fail this time
if (!(ssh2_scp_send($this->conn, $lpath, $rpath, 0777))){
            throw new Exception("File transfer failed!");
        }
        ssh2_exec($this->conn, 'exit')

"Warning: ssh2_scp_send(): Failed copying file in /var/www/trunk/rsetting/class/ssh.class.php on line 57"

Any help will be appreciated~Thanks

  • 写回答

2条回答 默认 最新

  • dongmangsha7354 2016-06-28 02:58
    关注

    update php-ssh2 extension to 0.13 will be fine.

    评论

报告相同问题?

悬赏问题

  • ¥15 maple软件,用solve求反函数出现rootof,怎么办?
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥15 state显示变量是字符串形式,但是仍然红色,无法引用,并显示类型不匹配
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波
  • ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗