CryptKey.php第57行中的ErrorException:
密钥文件“file:// C:\ wamp \ www \ project \ public_html \ storage \ oauth-private.key”权限不正确,应为600或660而不是666
我的配置如下:
知道怎么解决吗?
您可以在第57行关闭文件检查权限
你的CryptKey路径是vendor/league/oauth2-server/src/CryptKey.php
在第48行,将其变为false或评论你的CryptKey.php
中的以下块
if ($keyPermissionsCheck === true) {
// Verify the permissions of the key
$keyPathPerms = decoct(fileperms($keyPath) & 0777);
if (in_array($keyPathPerms, ['600', '660'], true) === false) {
trigger_error(sprintf(
'Key file "%s" permissions are not correct, should be 600 or 660 instead of %s',
$keyPath,
$keyPathPerms
), E_USER_NOTICE);
}
}
keyPermissionsCheck
将其设为假。
希望这可以帮助。
简单地将oauth-private.key文件CHMOD到600或660.我看到你使用Windows,所以你可以按照this post中的指示来做到这一点。
我有同样的问题,但这个文件CryptKey.php在我的项目中没有它