通过PHP进行SURL支持的CURL

时间:2018-11-24 23:03:43

标签: php curl ubuntu-16.04 sftp

我正在使用运行PHP7.0和Magento2的Ubuntu 16.04。我已经安装了一个Magento插件,该插件需要CURL SFTP才能将XML产品Feed发送到远程服务器。

我注意到Ubuntu上安装的默认CURL不支持SFTP,因此我按照说明在服务器上重新编译它,现在已经支持。

~$ 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

但是,我没有意识到PHP具有自己的CURL库,并且我不知道如何修改它以提供SFTP支持。

我尝试发出“ $ sudo apt-get install php7.0-curl”,结果是:

~$ 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).

但是,这不是我运行phpinfo()时所报告的内容。它是一个不同的版本,并且未列出SFTP协议。

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

我不确定下一步是什么。

0 个答案:

没有答案