note 97123 added to function.ssh2-scp-send

From: Date: Fri, 02 Apr 2010 14:23:40 +0000
Subject: note 97123 added to function.ssh2-scp-send
Groups: php.notes 
Request: Send a blank email to php-notes+get-167645@lists.php.net to get a copy of this message
On Windows, I had trouble using ssh2_scp_send: files copied to a remote server where incomplete (truncated) and/or locked (error message : "access denied"). The back-end is also on Windows, using CopSSH (cygwin-based SSH server). The SSH session was kept open - and the file were never flushed to disk. There's a workaround though - make an explicit call to "exit" to close the session (flushing file content to disk): $objConnection = ssh2_connect($strHost, $strPort, $methods, $callbacks); ssh2_auth_password($objConnection, $strUser, $strPassword); ssh2_scp_send($objConnection , $strSource, $strDest); // Add this to flush buffers/close session ssh2_exec($objConnection, 'exit'); ---- Server IP: 195.221.21.36 Probable Submitter: 2a01:e35:8a7a:ec70:f84a:55ca:6bb1:567 ---- Manual Page -- http://www.php.net/manual/en/function.ssh2-scp-send.php Edit -- https://master.php.net/note/edit/97123 Del: integrated -- https://master.php.net/note/delete/97123/integrated Del: useless -- https://master.php.net/note/delete/97123/useless Del: bad code -- https://master.php.net/note/delete/97123/bad+code Del: spam -- https://master.php.net/note/delete/97123/spam Del: non-english -- https://master.php.net/note/delete/97123/non-english Del: in docs -- https://master.php.net/note/delete/97123/in+docs Del: other reasons-- https://master.php.net/note/delete/97123 Reject -- https://master.php.net/note/reject/97123 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#167645) next »