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 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器