Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call to undefined function password_hash() in PHP 5.4

I am trying to use the password_hash() function in my website, and I am getting an error Call to undefined function password_hash(). I checked my Server Details in GoDaddy, and my current version of php is 5.4. How can I fix this?

like image 370
Bono Avatar asked May 06 '26 23:05

Bono


1 Answers

password_hash() is not available in PHP 5.4. It is a new feature in PHP 5.5. In the meantime you can use this compatibility pack replacement.

Compatibility pack sidenote:

This library requires PHP >= 5.3.7 OR a version that has the $2y fix backported into it (such as RedHat provides). Note that Debian's 5.3.3 version is NOT supported.

For versions not covered by these versions, consult:

  • http://php.net/crypt - (PHP 4, PHP 5)
like image 67
John Conde Avatar answered May 08 '26 13:05

John Conde



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!