[英]PHP under Laragon - SSL operation failed with code 1
我在 Windows 10 上使用Laragon 4.0.16 在 PHP 中进行开发。
我使用 Laragon 工具启用了 SSL :
还将 laragon.crt 添加到 Trust Store。
我可以在https://project.test
正确访问我的测试项目。
但是,有一个问题:
警告:getimagesize():SSL 操作失败,代码为 1。OpenSSL 错误消息:错误:1416F086:SSL 例程验证过程证书:验证失败
我一直在阅读解决此类问题的方法是在 PHP ini 配置文件中设置curl.cainfo和openssl.cafile 。
我这样做了,在位于C:\laragon\bin\php\php-xxx\php.ini
的 Laragon 全局php.ini中:
curl.cainfo = "C:\laragon\etc\ssl\cacert.pem"
openssl.cafile = "C:\laragon\etc\ssl\cacert.pem"
但重启 Laragon 后,php 警告仍然存在。
我还能做些什么来追踪问题并解决它?
谢谢你。
我花了几个小时试图弄清楚这个问题。 我找到的所有解决方案都说明了以下几点:
根本没有帮助。 真正起作用的是切换到 php 7.3(我的代码无法运行 7.4,我在那里遇到了不同的错误)。 The reason why seems to be that for php 7.2.19 the php_openssl.dll has the version 1.1.1b and the php_openssl.dll for version 7.3 and up has the version 1.1.1k.
这终于解决了这个问题。 我希望这可以帮助某人几个小时的疯狂。 我不确定这是否会在 php 的未来版本中再次发生:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.