Hi all,
I'm having a nightmare trying to sftp using PHP. First of all my research told me that i needed to install the SSH2 library for PHP, for various reasons it has not been possible to install this, i understand there is some kind of conflict with Zend. I'm by no means an expert on php installs but my server admin has told me its just not going to be possible. I then moved on to trying to sFTP using cURL, according to the cURL documentation this is possible in 7.16.1+ but i could find absolutely no documentation how this should be done in php, all i could find was info on FTP with SSL which isnt what i need. I then looked into cURL through the command line, i tried it only to find out that the cURL version on the server was not new enough, the php version of cURL was but not the version on the server (CentOS 4.6). Although the admin wasnt too keen i managed to get him to update cURL to 7.18. I then tested this in the command line and was able to get and put files to the sFTP site - Great!. All i needed to do now was send this command through PHP, presuming this was just going to work i tested this out and nothing happened, checking my error log i saw this:
curl: (1) Unsupported protocol: sftp
Running the exact same command direct in the command line works but when i try to call it through either system() or exec() it errors, what is going on?
Any advice would be greatly appreciated.
thanks a lot.