gpt4 book ai didi

php - 异常 : "Could not gather sufficient random data"

转载 作者:搜寻专家 更新时间:2023-10-31 20:35:42 26 4
gpt4 key购买 nike

客户端出现以下错误

CRITICAL: Uncaught PHP Exception Exception: "Could not gather sufficient random data" at /.../vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php line 69 {"exception":"[object] (Exception(code: 0): Could not gather sufficient random data at /.../vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php:69)"} []

[更正客户端 PHP 版本]

试图查看或编辑记录。客户端在 Symfony 2.8.2、PHP 5.6.18 上,运行在 freebsd 上。我的开发系统是 Symfony 2.8.2、PHP 7、Windows 10,但没有出现此错误。

运行 composer update 不会影响此行为。

最佳答案

答案出现here由 paragonie 的 Scott 提供。它说,

It means precisely what it says: Something about your environment is preventing mcrypt_create_iv($numBytesRequested, MCRYPT_DEV_URANDOM) from generating enough entropy.

Make sure PHP can read /dev/urandom, especially if you're in a chroot jail. Without access to the kernel's CSPRNG, we cannot reliably generate random data suitable for cryptography.

由于该站点位于共享主机上,而我对 freebsd 基本上一窍不通,因此我将其转发给了主机的网站管理员。问题已解决。

关于php - 异常 : "Could not gather sufficient random data",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35736548/

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