ThePsion5 Posted June 30, 2006 Share Posted June 30, 2006 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 More sharing options...
boen_robot Posted July 1, 2006 Share Posted July 1, 2006 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 More sharing options...
justsomeguy Posted July 2, 2006 Share Posted July 2, 2006 You can try using sockets to open a connection and see if you can connect at all. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now