PHP password hash undefined function
Hallo,
ich wollte gerade eine Hash Funktion für Passwörter schreiben und benutze dazu folgenden Code:
Der Compiler gibt mir als Antwort:
Fatal error: Call to undefined function password_hash() in my.php on line 70
Laut Dokumentation müsste die Funktion aber verfügbar sein.
System:
Windows 7 64 Bit
Apache 2.2
PHP 5.4.12
Phpinfo():
hash
hash support -> enabled
Hashing Engines -> md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost adler32 crc32 crc32b fnv132 fnv164 joaat haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5
mhash
MHASH support -> Enabled
MHASH API Version -> Emulated Support
Muss hier noch ein Modul in der PHP.ini frei geschaltet werden? Oder weiss jemand wieso das so ist?
mfG
Cubic
ich wollte gerade eine Hash Funktion für Passwörter schreiben und benutze dazu folgenden Code:
password_hash(urlencode($Password), PASSWORD_BCRYPT, array('cost' => 20));
Der Compiler gibt mir als Antwort:
Fatal error: Call to undefined function password_hash() in my.php on line 70
Laut Dokumentation müsste die Funktion aber verfügbar sein.
System:
Windows 7 64 Bit
Apache 2.2
PHP 5.4.12
Phpinfo():
hash
hash support -> enabled
Hashing Engines -> md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost adler32 crc32 crc32b fnv132 fnv164 joaat haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5
mhash
MHASH support -> Enabled
MHASH API Version -> Emulated Support
Muss hier noch ein Modul in der PHP.ini frei geschaltet werden? Oder weiss jemand wieso das so ist?
mfG
Cubic
Please also mark the comments that contributed to the solution of the article
Content-Key: 213875
Url: https://administrator.de/contentid/213875
Printed on: April 25, 2024 at 01:04 o'clock
4 Comments
Latest comment
Hallo Cubic,
siehe: http://de2.php.net/manual/de/function.password-hash.php
Grüße Uwe
password_hash()
ist erst ab PHP 5.5.0 verfügbar !siehe: http://de2.php.net/manual/de/function.password-hash.php
Grüße Uwe