本文没有配图

记一个SSL报错Warning: getimagesize(): SSL operation failed with code 1

今天在给一个外贸网站安装主题的时候,导入完毕Demo数据,网站前台图片显示的位置报错,内容如下:

Warning: getimagesize(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /www/wwwroot/*/wp-content/themes/*/framework/class-image.php on line 120

Warning: getimagesize(): Failed to enable crypto in /www/wwwroot/*/wp-content/themes/*/framework/class-image.php on line 120

Warning: getimagesize(https://*/wp-content/uploads/2021/02/video-opacity-tiny.png): failed to open stream: operation failed in /www/wwwroot/*/wp-content/themes/*/framework/class-image.php on line 120

出现这个问题的原因是证书问题,解决办法如下:

1、下载cert证书到服务器任意位置,地址:https://curl.haxx.se/ca/cacert.pem
2、修改php.ini 配置文件里面的openssl.cafile= 为 openssl.cafile=服务器目录/cacert.pem
3、重新执行即可~
————————————————
方法来源:https://blog.csdn.net/default7/article/details/77008973

5/5 - (1 vote)
滚动至顶部