Jump to content

PHP's FTP commands and SFTP


ThePsion5

Recommended Posts

Hi guys,I'm trying to determine whether one can use SFTP with PHP's FTP functions, but so far my results are a bit inconclusive.I attempt to open the following connection on port 21, which isn't open - obviously, I get an error. However, when I attempt the same connection on port 22 (SFTP, if i'm not mistaken) with the appropriate username/password information, the PHP script simply runs continiously until the server shuts it down for surpassing the maximum execution. I feel like if PHP's ftp functions didn't support SFTP I'd get some kind of informative error message, but no luck. When setting the timeout value in ftp_connect(), the script does end after the specified amount of time, but what does that actually mean? Does PHP simply not support SFTP connections?P.S. I'm currently testing PHP version 4.4.2

Link to comment
Share on other sites

Well, perhaps it really doesn't support them. There has to be some difference if those types of connections are on different ports after all :) .Why is port 21 closed anyway? Can't you open it?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...