Topic: PHP 7.4 does not seem to be compiled with --with-password-argon2

Hi,

I just upgraded to PHP 7.4 from the Remi repo, and it looks like PHP 7.4, whether installed as a Software Collection or not, is not compiled with --with-password-argon2:

$ php73 -r "echo PASSWORD_ARGON2ID;"
3
$ php74 -r "echo PASSWORD_ARGON2ID;"
PHP Warning:  Use of undefined constant PASSWORD_ARGON2ID - assumed 'PASSWORD_ARGON2ID' (this will throw an Error in a future version of PHP) in Command line code on line 1

Is there any reason why?

Re: PHP 7.4 does not seem to be compiled with --with-password-argon2

you need the ohp-sodium package which provide the argon2 algo

Desktop: Fedora 31 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: PHP 7.4 does not seem to be compiled with --with-password-argon2

Oops, sorry about that! I did check for a missing package, but I was looking for something containing "argon" in the name.
And the fact that php73 (SCL) did work without php73-php-sodium added to the confusion! Why does it work without the sodium package?

Re: PHP 7.4 does not seem to be compiled with --with-password-argon2

PHP 7.3 can only use the libargon2 implementation in standard extension
PHP 7.4 can also use the libsodium implementation in sodium which is better and faster

$ php73 /tmp/foo.php 
PHP version : 7.3.15
Genrerated in 0.143"

$ php74 /tmp/foo.php 
PHP version : 7.4.3
Genrerated in 0,082"

Also in https://github.com/remicollet/remirepo/issues/137

Desktop: Fedora 31 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: PHP 7.4 does not seem to be compiled with --with-password-argon2

Thank you for the explanation.

> PHP 7.4 can also use the libsodium implementation in sodium which is better and faster

Does that mean that PHP 7.4 should also be able to use the standard extension implementation?
Because at the moment it's not!

Re: PHP 7.4 does not seem to be compiled with --with-password-argon2

> Does that mean that PHP 7.4 should also be able to use the standard extension implementation?

Yes, with the proper build option
But IMHO, that doesn't make sense to use it, as the sodium implementation is faster
And this also reduce dependency of PHP (no libargon2)
And libargon2, the referenced implementation is not a real and maintained project

Desktop: Fedora 31 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test