2

I am using Ubuntu 16.04, running PHP7.0 and Magento2. I have installed a Magento Plugin which requires CURL SFTP to send an XML product feed to a remote server.

I noticed that the default CURL installed with Ubuntu does not support SFTP, so I followed instructions to re-compile it on the server, and now has support.

~$ curl -V
curl 7.62.0 (x86_64-pc-linux-gnu) libcurl/7.62.0 OpenSSL/1.1.1 libssh2/1.5.0
Release-Date: 2018-10-31
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL TLS-SRP UnixSockets HTTPS-proxy

However, I did not realize that PHP has its own CURL library, and I don't know how to modify it to provide SFTP support.

I tried issuing "$ sudo apt-get install php7.0-curl" and it results in:

~$ sudo apt-get install php7.0-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
php7.0-curl is already the newest version (7.0.32-4+ubuntu16.04.1+deb.sury.org+1).

However, this is not what is reported when I run phpinfo(). It is a different version and also SFTP protocol is not listed.

curl
cURL support    enabled
cURL Information    7.47.0
Age 3
Protocols   dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtmp, rtsp, smb, smbs, smtp, smtps, telnet, tftp

I'm not sure what next step to take is..

Art
  • 21
  • 1
  • You can always `exec()` or similar and access the command line tools of the host system - just be extra aware of the potential security issues. Or there may be a better way to do it - what are you trying to get done? – ivanivan Nov 24 '18 at 23:08
  • I had to do something very similar and the following link worked for me: https://stackoverflow.com/questions/4689540/how-to-sftp-with-php – Altimus Prime Nov 24 '18 at 23:28
  • Thank you for the comments, yes, as a last resort I will look at re-programming the 3rd party plugin but I don't want to do that because then I can never upgrade it or receive support. In response to what I'm trying to get done, it is to get a google shopping feed setup on Magento2 – Art Nov 26 '18 at 01:16

0 Answers0