Can someone tell me, how I can install ARGON2i with homebrew? It seems that it's not shipped with PHP 7.2 by default.
I already updated to homebrew/core. Removed 7.2 and reinstalled.
I tried it with brew reinstall php72 --with-password-argon2 and brew reinstall php72 --with-argon2. I am getting the Error: invalid option: and i can't find any pieces of information about how to compile PHP 7.2 with argon2 with Homebrew? ... :(
I also installed it via homebrew like described here:
brew install argon2
Warning: argon2 20171227 is already installed and up-to-date
But if i try to use Argon i am getting always the error
Notice: Use of undefined constant PASSWORD_ARGON2I - assumed 'PASSWORD_ARGON2I`
So i assume Argon2 is not compiled with PHP 7.2
Do you see argon2 in the output of <?php phpinfo();? I just did a clean install of 7.2 and it seems to be enabled, the following also outputs a password hashed with Argon2:
<?php
$hash = password_hash($password, PASSWORD_ARGON2I);
var_dump($hash);
Ps. do not use homebrew/core php packages but use the henkrehorst/php tap - so brew install [email protected]
I am getting the same error:
Use of undefined constant PASSWORD_ARGON2I - assumed 'PASSWORD_ARGON2I'
There's nothing about argon in the phpinfo();. I will try it with henkrehorst/php, maybe this works :)
I suspect that php might not be switching correctly on your side - could you verify that phpinfo() outputs 7.2 in your browser?
I suspect that php might not be switching correctly on your side - could you verify that phpinfo() outputs 7.2 in your browser?
Oh! Yeah! You're correct. phpinfo() is referencing to PHP 7.1 but if i make a php -v on my console i am getting
PHP 7.2.15 (cli) (built: Feb 26 2019 10:43:45) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.15, Copyright (c) 1999-2018, by Zend Technologies
Do you know how to fix this issue?
I already removed all other php versions
brew list | grep php
[email protected]
But it seems that php7.1 is installed also somewhere else without homebrew ..
EDIT
Okay, i fixed it. I needed to stop 7.1 even i uninstalled it already. brew services stop php71. Now the phpinfo() shows PHP 7.2
Assuming you are running on a newish Valet+ version, try running:
brew remove [email protected]
brew tap henkrehorst/php
brew install [email protected]
brew link [email protected] --force --overwrite
valet use 7.2
brew remove [email protected]
Follow this with a restart of your Mac (I assume your NGINX socket is probably causing headaches - restart fixes this issue and you shouldn't really encounter this issue again). Steps might seem excessive but if you do them all you have a better chance at fixing the issues above.
@samgranger Thanks for your suggestions: I needed to stop PHP 7.1 Even i already uninstalled 7.1
Now it's working 馃憤 . Thanks for your fast help!
Glad you managed to solve your issue.