Customer applet distribution poster function, always report an error when using getimagesize()
PHP getimagesize(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
The initial judgment is that there is no setting in openssl.cafilephp.ini. After opening the php configuration file, I found that it was set. The current settings are:
openssl.cafile=/etc/pki/tls/certs/ca-bundle.crt
Later, I suspected that the certificate might have expired. I first compared the contents of the files on my server and found that the sizes were inconsistent. Then I copied and pasted the content from my own server. After saving, the problem of reloading the php configuration still exists;
I remember that a similar problem occurred on the windows system before. At that time, curl.cainfo was configured, so I downloaded the certificate and put it in the /usr/local/openssl/ directory and modified the configuration.
[curl]
curl.cainfo = /usr/local/openssl/cacert.pem
[openssl]
openssl.cafile=/usr/local/openssl/cacert.pem
Finally found a similar question on Stack Overflow
It is found that the Linux system has a command to update the local certificate. Different system commands are different. CentOS operates as follows:
# Install ca certificate tool
yum install ca-certificates -y
# Update certificate
update-ca-trust
The problem is solved
Post comment 取消回复