Today, I encountered a problem with the client application server (CentOS). When using getimagesize(), an error is always reported:
PHP getimagesize(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_ get_ server_ certificate:certificate verify failed
It is preliminarily judged that openssl.cafile in php.ini is not set. After opening the PHP configuration file, it is found that it is set. The current setting value is:
openssl.cafile=/etc/pki/tls/certs/ca-bundle.crt
After that, it was suspected that the certificate might expire. First, compare the contents of the file on your own server. If you find that the size is inconsistent, copy and paste the contents from your own server. After saving, the problem of reloading PHP configuration still exists;
Remember that similar problems have occurred on Windows systems before. At that time, curl.cainfo
was configured, so from this website
: http://curl.haxx.se/ca/cacert.pem Download the certificate and put it in the /usr/local/OpenSSL/
directory to modify the configuration
[curl]
curl.cainfo = /usr/local/openssl/cacert.pem
[openssl]
openssl.cafile=/usr/local/openssl/cacert.pem
When this problem occurs on the Internet, the solutions found are also operated in this way. However, the overload configuration problem remains after saving. Change the configuration back again.
Finally, see this article on: https://stackoverflow.com/questions/17084886/ssl-error-routinesssl3-get-server-certificatecertificate-verify-failed
It is found that the Linux system has the command to update the local certificate. The commands are different for different systems. The CentOS operation is as follows:
#Install ca certificate tool
yum install ca-certificates -y
# Update Certificate
update-ca-trust
Problem-solving.
Read More:
- [Solved] OpenSSL Error messages: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure
- Mac installs the php Swoole extension and appears Enable openssl support, require openssl library or fatal error:’openssl/ssl.h’ file not found
- [Solved] file_get_contents(): SSL operation failed with code 1
- [Solved] getObject: FAILED RequestCoreException: cURL resource: Resource id #78; cURL error: SSL certificate
- [Solved] iis cURL error 60: SSL certificate problem: unable to get local issuer certificate
- PHP curl error: SSL certificate problem: unable to get local issuer certificate settlement program
- [Solved] cURL error 60: SSL certificate problem: unable to get local issuer certificate
- [Solved] PHP Error: Warning: file_get_contents(): Failed to enable crypto
- Error during session start; please check your PHP and/or webserver log file and configure your PHP
- PHP file download, download failed, nginx open() nginx / fastcgi_ temp/2/10/0000000102“ failed (13: Permission denied)
- php_network_getaddresses: getaddrinfo failed (How to Fix)
- php Error: mail() Failed to connect to mailserver at “localhost” port 25
- [Solved] PHP -v Error: error while loading shared libraries: libonig.so.5:cannot open share directory
- PHP encryption 3DES error Call to undefined function: mcrypt_module_open() solution
- [Solved] PHP installation Phalcon expansion error
- Configure: error: Cannot find libz error appears when brew installs php70
- PHP error in Windows: class’ mysqli ‘not found
- [Solved] Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 60
- PHP php-config is not installed error in ubuntu 16 [How to Solve]
- Mac PHP Fatal error: Class ‘Memcache’ not found