gpt4 book ai didi

低于 5.6 版的 PHP cafile

转载 作者:太空宇宙 更新时间:2023-11-03 14:06:38 24 4
gpt4 key购买 nike

包含证书的等效参数或方法是什么,以便您可以在 PHP 5.5.* 中建立 ssl 连接。

我坚持使用那个版本,无法更新它,我需要包含一个用于 Composer 更新的证书文件。我知道我必须在 PHP 5.6 中使用 openssl.cafile 参数,一切都很好。但在我的用例中我一无所知。

谢谢。

最佳答案

whats the equiliant parameter or method to include certificates so that you can establish ssl connections in PHP 5.5.* .

没有。

这是一个 new feature in PHP 5.6 :

All encrypted client streams now enable peer verification by default. By default, this will use OpenSSL's default CA bundle to verify the peer certificate. In most cases, no changes will need to be made to communicate with servers with valid SSL certificates, as distributors generally configure OpenSSL to use known good CA bundles.

The default CA bundle may be overridden on a global basis by setting either the openssl.cafile or openssl.capath configuration setting, or on a per request basis by using the cafile or capath context options.

但是,Composer 有 its own cafile setting你应该可以使用:

cafile

Location of Certificate Authority file on local filesystem. In PHP 5.6+ you should rather set this via openssl.cafile in php.ini, although PHP 5.6+ should be able to detect your system CA file automatically.

我建议通过 Composer's command-line config interface 进行设置,例如像

composer global config cafile <your-setting>

关于低于 5.6 版的 PHP cafile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40218455/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com