-2

我没有找到将 argon2i 散列添加到 phpbrew 中正在运行的 7.2.27 版本的方法。有没有办法完成它?我试过了

phpbrew ext install argon2i

我明白了

Downloading https://pecl.php.net/rest/r/argon2i/stable.txt via curl extension
CurlKit\CurlException: (22) The requested URL returned error: 404 Not Found at [https://pecl.php.net/rest/r/argon2i/stable.txt:The requested URL returned error: 404 Not Found]
Trace:

    0) CurlKit\CurlDownloader->request('https://pecl.php.net/rest/r/argon2i/stable.txt')
    1) PhpBrew\Downloader\PhpCurlDownloader->process('https://pecl.php.net/rest/r/argon2i/stable.txt', '/tmp/phpbrew_R5kDEJ')
    2) PhpBrew\Downloader\BaseDownloader->download('https://pecl.php.net/rest/r/argon2i/stable.txt')
    3) PhpBrew\Downloader\BaseDownloader->request('https://pecl.php.net/rest/r/argon2i/stable.txt')
    4) PhpBrew\Extension\Provider\PeclProvider->buildPackageDownloadUrl('stable')
    5) PhpBrew\Extension\ExtensionDownloader->download(PhpBrew\Extension\Provider\PeclProvider, 'stable')
    6) PhpBrew\Command\ExtensionCommand\InstallCommand->execute('argon2i')
    7) call_user_func_array([PhpBrew\Command\ExtensionCommand\InstallCommand, 'execute'], ['argon2i'])
    8) CLIFramework\CommandBase->executeWrapper(['argon2i'])
    9) CLIFramework\Application->run(['/usr/local/bin/phpbrew', 'ext', 'install', 'argon2i'])
    10) PhpBrew\Console->runWithTry(['/usr/local/bin/phpbrew', 'ext', 'install', 'argon2i'])
    11) require('phar:///usr/local/bin/phpbrew/bin/phpbrew')

所以没有 ext argon2 或 argon2i。

我肯定是通过 apt-get 安装了 argon2

sudo apt install argon2 libargon2-0 libargon2-0-dev

成功地。

但我不知道如何让 PHP 使用该库。有什么提示吗?

4

1 回答 1

2

找到它:您必须使用选项 --with-password-argon2 重新安装:

phpbrew install php-7.3.19 +default -- --with-password-argon2
于 2020-06-22T14:44:11.733 回答