例外:"Could not gather sufficient random data"
Exception: "Could not gather sufficient random data"
客户端出现以下错误
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 基本上一窍不通,因此我将其转发给了主机的网站管理员。问题已解决。
客户端出现以下错误
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 基本上一窍不通,因此我将其转发给了主机的网站管理员。问题已解决。