This has been triaged a bit in /remicollet/php-xpass/issues/7, but it looks like this is the summary of the issue:
- php-install-extensions xpass will automatically trigger a pull of libxcrypt (it's dependancy).
- libxcrypt is built and installed fine
- xpass is built and installed fine
- php recognises xpass installed (it shows in phpinfo())
However, calls to xpass functions (specifically tested is Yescrypt ie: password_hash($password,PASSWORD_YESCRYPT) isnt using the libxcrypt library, its still using alpine's musl crypt library.
Claude indicates php needs to be built with --with-external-libcrypt
--- Here is my interaction with claude
Also the most useful diagnostic:
php -r '
var_dump(PHP_VERSION);
var_dump(crypt("secret", "$y$j9T$saltvalue1234567890123$"));
'
If crypt() returns *0 or a DES hash, PHP still isn't using your libxcrypt. And confirm PHP's linkage again after your libxcrypt reinstall:
ldd $(php -r 'echo PHP_BINARY;') | grep crypt
It should now show libcrypt.so.1 (since you built with --enable-obsolete-api=yes). If it still shows nothing, PHP needs to be rebuilt with --with-external-libcrypt regardless of what libxcrypt is installed.
--- End interaction
And fwiw, ldd $(php -r 'echo PHP_BINARY;') | grep crypt was blank.
This has been triaged a bit in /remicollet/php-xpass/issues/7, but it looks like this is the summary of the issue:
However, calls to xpass functions (specifically tested is Yescrypt ie:
password_hash($password,PASSWORD_YESCRYPT)isnt using the libxcrypt library, its still using alpine's musl crypt library.Claude indicates php needs to be built with
--with-external-libcrypt--- Here is my interaction with claude
Also the most useful diagnostic:
If crypt() returns *0 or a DES hash, PHP still isn't using your libxcrypt. And confirm PHP's linkage again after your libxcrypt reinstall:
It should now show libcrypt.so.1 (since you built with --enable-obsolete-api=yes). If it still shows nothing, PHP needs to be rebuilt with --with-external-libcrypt regardless of what libxcrypt is installed.
--- End interaction
And fwiw,
ldd $(php -r 'echo PHP_BINARY;') | grep cryptwas blank.