How to track errors on sFTP???

Get help with using the PHP Secure Communications Library.

Moderator: Nuxius

Forum rules
The purpose of this forum is to provide support for phpseclib, a pure PHP SSH / SFTP / RSA library.

Posts by new users are held in a moderation queue and are not publicly visible until the post is approved.

How to track errors on sFTP???

Postby napolux » Tue Jul 30, 2013 1:24 pm

In the examples I found on the site I see that we only check for failed login and then connections, uploads, etc... are run without any check on the final status of the call. The functions themselves are not returning any values...
Maybe this sounds as a stupid question, but how can I be sure that my file is uploaded/downloaded correctly?

Posts: 4
Joined: Tue Jul 30, 2013 1:21 pm

Re: How to track errors on sFTP???

Postby TerraFrost » Wed Jul 31, 2013 6:13 pm

Unfortunately, there's not really a way to do this with pure SFTP. Not even the protocol has anything that'd enable you to do this.

The best you can do is to use SSH2 to check the hash of the remote file and to check the hash of the local file as well and compare the two.
Legendary Guard
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am

Return to phpseclib support

Who is online

Users browsing this forum: No registered users and 3 guests