|
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 curl -V php -i output (curl portion): curl apache2 is loaded with php5.6 module What I tried - upgrade ubuntu to 16.04.3 and reboot
but still not work
- 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
