note 51986 deleted from function.ssh2-sftp by pollita

From: Date: Sat, 16 Jul 2005 04:05:22 +0000
Subject: note 51986 deleted from function.ssh2-sftp by pollita
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-92046@lists.php.net to get a copy of this message
Note Submitter: daveywalbeck at yahoo dot com ---- I think it's worth mentioning that if you plan to use the 'fopen' command to write to a remote file, the example provided failed consistantly using the syntax given, as well as the second method. ssh2.sftp://$sftp/example.com/path/to/file ssh2.sftp://user:pass@$sftp/example.com/path/to/file It's just a small adjustment to correct this, but as most coding goes, a long road to find a stupid little oversight. Apparently it is necessary to supply the port as well in the path. Could just be the few systems I was testing against, but that would be three separate networks using three separate platforms (Windows Server, Linux, Unix). At any rate, the following works like a charm, and was very simple to install the libssh2 library and PECL SSH2 module required to use this system. Gotta love PHP. ssh2.sftp://$sftp/example.com:22/path/to/file ssh2.sftp://user:pass@$sftp:22/example.com/path/to/file Hope this saves anyone some headache and time.

« previous php.notes (#92046) next »