Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
741 views
in Technique[技术] by (71.8m points)

php password hash - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...