php curl Problem with the SSL CA cert (path? access rights?)

公司有臺老服務器,搭的php的環境,有個負載均橫的服務 調用 curl_init 的時候報了 Problem with the SSL CA cert (path? access rights?) 網上各類腦補php

 

yum install ca-certificates yum reinstall ca-certificates

當我用 rpm -V ca-certificates 這個命令時的確沒有輸出nginx

[root@app1 certs]# rpm -V ca-certificates [root@app1 certs]# ls Makefile ca-bundle.crt  ca-bundle.trust.crt  cacert.pem  make-dummy-cert  renew-dummy-cert [root@app1 certs]# mv ca-bundle.crt.bak mv: missing destination file operand after `ca-bundle.crt.bak' Try `mv --help' for more information.
[root@app1 certs]# mv ca-bundle.crt ca-bundle. ca-bundle.crt        ca-bundle.trust.crt [root@app1 certs]# mv ca-bundle.crt ca-bundle.crt.bak [root@app1 certs]# ls Makefile ca-bundle.crt.bak  ca-bundle.trust.crt  cacert.pem  make-dummy-cert  renew-dummy-cert [root@app1 certs]# mv cacert.pem ca-bundle.crt [root@app1 certs]# rpm -V ca-certificates S.5....T.  c /etc/pki/tls/certs/ca-bundle.crt

一陣命令如虎的操做,顯示出來了docker

最後重啓了一下 php-fpmcentos

[root@app1 certs]# service php-fpm restart Restarting php-fpm daemon: php-fpm[19-Feb-2019 14:27:26] ERROR: unable to bind listening socket for address '10.47.97.153:9000': Address already in use (98) [19-Feb-2019 14:27:26] ERROR: FPM initialization failed already running.

發現報錯了子,心都是慌的,這個大概是把 php-fpm 進程給幹掉,而後 nginx 自動會啓新的 php-fpm ,刷一變報502,刷2變就正常了服務器

到此問題解決了,忽然仍是發現 docker 好,至少鏡像出了問題,能夠在鏡像裏面解決.app

 

分別參考:curl

https://stackoverflow.com/questions/15135834/php-curl-curlopt-ssl-verifypeer-ignored#comment78570660_15237205socket

https://www.centos.org/forums/viewtopic.php?t=3711php-fpm

相關文章
相關標籤/搜索