I am having a problem with enabling Argon2 for password hashing. I am building PHP from source of Amazon Linux 2 but once the build have finishing and PHP is compiled, the PASSWORD_ARGON2I
constant is undefined and the algorithm is not available.
I have tried numerous different ways to compile PHP using different libraries but none of them give me the Argon2 algorithm that I need. Below I will list some steps I have taken:
1) Giving flag --with-sodium
Compiling with this flag completes, but running a test script that includes the function password_hash()
shows that Argon2I is not available.
2) Compiling with flag --with-password-argon2
This fails to compile due to a missing library which can be seen in the error below.
checking for Argon2 support... yes
checking for Argon2 library... not found
configure: error: Please ensure the argon2 header and library are installed
From this, I assume that I am missing a library required for the flag to work so I have installed Libsodium. Trying again has the same result.
3) Next I install some more dependencies on the recommendation from a tutorial. These are: - argon2 - libargon2-0 - libargon2-0-dev
This does give me the cli tool argon2
which works, however compiling PHP again doesn't work with the same errors.
At the point Im not sure what my next step is, any help would be greatly appreciated.
from Installing PHP on Amazon Linux 2 with Argon2 Enabled
No comments:
Post a Comment