|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2021-09-24 17:45 UTC] s dot grindau at smart-media-gmbh dot de
Description: ------------ compiling from source with "with-password-argon2" results in argon2 not beeing available. after compiling 8.0.11 php -r 'print_r(get_defined_constants());' | grep -i argon [PASSWORD_ARGON2I] => argon2i [PASSWORD_ARGON2ID] => argon2id [PASSWORD_ARGON2_DEFAULT_MEMORY_COST] => 65536 [PASSWORD_ARGON2_DEFAULT_TIME_COST] => 4 [PASSWORD_ARGON2_DEFAULT_THREADS] => 1 [PASSWORD_ARGON2_PROVIDER] => standard after compiling 8.1.0RC1 OR 8.1.0RC2 php -r 'print_r(get_defined_constants());' | grep -i argon -> nothing! i tried one build with sodium, which then showed argon2 because i found a hint on stackoverflow which then had the constants available but crashed because of the $options['threads' => 8 ], because it supports only one thread. However i wanted to use it like before without sodium, etc. I have to say that i am not THAT experienced in building php from source. However other builds from the stable releases work with the same configure options and i havent a bugreport about this (yet). Thank you. Test script: --------------- ./configure \ --disable-all \ --with-password-argon2 \ ... make -j32 sudo make install Expected result: ---------------- I expected the argon2id constants to be available and the password_hash() function to work like it ever did. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 15:00:01 2025 UTC |
> but crashed because of the $options['threads' => 8 ] Apparently you should be checking for whether the PASSWORD_ARGON2_DEFAULT_THREADS constant is defined, to know if the options for that function supports a 'threads' setting, and only set it if it's available: if(defined('PASSWORD_ARGON2_DEFAULT_THREADS')) { // Set the number of threads ... } https://stackoverflow.com/a/69326446/778719