Forum Moderators: coopster
I have done a general search on the web and there seem to be lots of opinions...most of which vary wildly. So does anyone have any experience of trying to get the ftp_ssl_connect to work as an SFTP set up?
I understand that the data is not encrypted with FTP however in this case the data is a load of maths for a chemistry PHD, so not sensitive financial information ;) So encryption that can only be broken by government organisations is not really required.
There are examples there and also requirements for this to work. Make sure OpenSSL is enabled on your server.
The first user comment for the function remarks that SSL-FTP!= SFTP.
I am trying to decide if this project is worth bothering with, or if there is a different way to go about it. As it seems that SFTP is outside of what php is capable of without some significant effort.
So the point was in the title...is ftp_ssl_connect actually able to be used as an SFTP connect? It seems that the answer is no.
Does anyone know a method of implementing SFTP through PHP?
I prefer using the ftps://wrapper [php.net] with the filesystem functions. You can set context options for the underlying transports [php.net].
That is the simplest way to get the job done. If that doesn't work, use fsockopen [php.net] to roll your own. If you are attempting this on a Windows box you will have to read the notes, there is always a hitch with that particular server.