[php-src] Issue #20024: password_hash: Password hashing failed for unknown reason, for long passwords
| From: | blaaat | Date: | Wed, 01 Oct 2025 09:16:38 +0000 |
| Subject: | [php-src] Issue #20024: password_hash: Password hashing failed for unknown reason, for long passwords | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-250965@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/20024
Author: blaaat
### Description
The following code:
```php
<?php
echo password_hash(str_repeat('a',1000), PASSWORD_DEFAULT);
```
Resulted in this output:
```
PHP Warning: Uncaught Error: Password hashing failed for unknown reason in php shell code:1
Stack trace:
#0 php shell code(1): password_hash(Object(SensitiveParameterValue), '2y')
#1 {main}
thrown in php shell code on line 1
```
But I expected this output instead:
```
an hash
```
installed php from this yum repo:
```
php.x86_64 8.3.26-1.el9.remi @remi-modular
```
### PHP Version
```plain
PHP 8.3.26 (cli) (built: Sep 23 2025 17:57:26) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.3.26, Copyright (c) Zend Technologies
with Zend OPcache v8.3.26, Copyright (c), by Zend Technologies
```
### Operating System
Rocky Linux release 9.5 (Blue Onyx)