curl-library
ubuntu 16.04.3 apache2 php5.6-curl not support ssl but curl-config --feature say support
Date: Mon, 23 Oct 2017 11:04:35 +0800
Dear all,
I have a problem in accessing
https url using curl in php but ok in CLI
My environment:
ubuntu server 16.04.3
dpkg --list | grep -i curl output:
ii curl
7.47.0-1ubuntu2.3
amd64 command line tool for transferring data with URL
syntax
ii libcurl3:amd64
7.47.0-1ubuntu2.3
amd64 easy-to-use client-side URL transfer library (OpenSSL
flavour)
ii libcurl3-gnutls:amd64
7.47.0-1ubuntu2.3
amd64 easy-to-use client-side URL transfer library (GnuTLS
flavour)
ii php-curl
1:7.1+55+ubuntu16.04.1+deb.sury.org+1
all CURL module for PHP [default]
ii php5.6-curl
5.6.31-6+ubuntu16.04.1+deb.sury.org+1
amd64 CURL module for PHP
ii php7.0-curl
7.0.24-1+ubuntu16.04.1+deb.sury.org+1
amd64 CURL module for PHP
ii php7.1-curl
7.1.10-1+ubuntu16.04.1+deb.sury.org+1
amd64 CURL module for PHP
ii python3-pycurl
7.43.0-1ubuntu1
amd64 Python bindings to libcurl (Python 3)
curl -V
curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10
zlib/1.2.8 libidn/1.32 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap
ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO
NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
php -i output (curl portion):
curl
cURL support => enabled
cURL Information => 7.47.0
Age => 3
Features
AsynchDNS => No
CharConv => No
Debug => No
GSS-Negotiate => No
IDN => No
IPv6 => Yes
krb4 => No
Largefile => Yes
libz => No
NTLM => No
NTLMWB => No
SPNEGO => No
SSL => No
SSPI => No
TLS-SRP => No
Protocols => dict, file, ftp, gopher, http, imap, pop3, rtsp,
smtp, telnet, tftp
Host => x86_64-pc-linux-gnu
apache2 is loaded with php5.6 module
What I tried
- reinstall apache2, curl, libcurl3, libcurl3-gnutls, php5.6 but still not work
Problem history
- at the very beginning, curl -V output with NSS instead of GnuTLS and I can't access https by curl in shell with this error:
curl --cert-status -v https://fcm.googleapis.com/fcm/send
* Trying 216.58.221.106...
* Connected to fcm.googleapis.com (216.58.221.106) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* WARNING: failed to load NSS PEM library libnsspem.so. Using OpenSSL PEM certificates will not work.
* Closing connection 0
curl: (77) Problem with the SSL CA cert (path? access rights?)
after I upgrade ubuntu to 16.04.3, I type "which curl" in shell and I found it is running /usr/local/bin/curl but not /usr/bin/curl, so I make "ln -s /usr/bin/curl /usr/local/bin/curl" and I can run curl to access https in shell, however, curl in php not support https and so I can't access https using curl in php
Question
Could any one tell me what I can do to solve the issue? Thanks in advance for any reply.
--
Rgds,
Arthur
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-10-23