-3

Hi I am try to use the password_hash() function like so

echo password_hash("mySecretPassword", PASSWORD_DEFAULT);

But I am gettig this error which I can figure out

Fatal error: Call to undefined function password_hash() 

My current PHP version is 5.3.19 32 bit

What is the cause of this issue?

Mike
  • 2,735
  • 11
  • 44
  • 68

1 Answers1

3

From the PHP docs.

password_hash()

(PHP 5 >= 5.5.0)

This means that only version after 5.5.0 has this method implemented. Running 5.3.0 will not work. There is however a fallback option posted in this answer.

You could also use the password_hash() compatibility pack.

Community
  • 1
  • 1
OptimusCrime
  • 14,662
  • 13
  • 58
  • 96
  • 2
    1 second reading the manual would of answered this –  May 01 '14 at 23:25
  • Indeed it would. Guessing this will be closed rather quickly, but now there is an answer for people roaming the interwebs later. This is not the last time this question will be asked ;) – OptimusCrime May 01 '14 at 23:28