Php – cURL php extension for windows with SCP and SFTP support

curlPHPscpsftp

I switched over to zendserver(VS8 php(5.3) binaries), and now curl(7.19.4) seems to be lacking SCP and SFTP protocol support(verified by errors and phpinfo). Curl itself is installed correctly, it's just lacking the protocol support mentioned.

This worked out of the box on the VC9(thread safe) binaries I downloaded off php.net(this installation is using apache binaries compiled with with VS9, hence why I was using php binaries compiled with VS9)

I'm assuming it has something to do with the curl extensions not built with VS9, because I also tried out the VS6 php binaries and that too was lacking SCP and SFTP support…

Looking at the curl section on phpinfo, I notice that the php installs without SCP/SFTP support do not have a libSSH Version listed, whereas the one with the support says: libSSH Version->libssh2/1.1

Any idea on why those curl extensions seem to not have been compiled with libssh2/1.1(???guessing that might be the case???) Or is it something else?

Best Answer

If you can't use CURL to do SFTP, you might be able to use this pure-PHP implementation of SFTP:

http://phpseclib.sourceforge.net/

Related Topic