Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Fatal Error: Call to undefined function password_verify()

Tags:

php

I have PHP 5.5.6 on my XAMPP and I didn't encounter the error. But after uploading my website to our testing environment the following error occurred:

PHP Fatal Error: Call to undefined function password_verify()

Our testing envt/server has PHP 5.5.9 (I checked it using command php -v)

I also checked the PHP manual and it says nothing to configure and nothing to install when using this functions. Any ideas what might be causing this issue?

like image 485
Ceeee Avatar asked Feb 14 '14 09:02

Ceeee


2 Answers

password_verify() is built in since PHP 5.5.0 and it's most likely that your server doesn't run the latest PHP version. Be sure to double check the PHP version on your server either via phpinfo() or phpversion().

Please note that your CLI and mod_php (or php-fpm) versions might differ, executing php -v might give you a wrong version number. Create a PHP file and open it with your browser to be absolutely sure.

The reason for the differing versions of the CLI, mod_php and php-fpm are related to the packages which are offered by the operating system and what the actual administrator installed on the system. Personally I prefer to compile PHP on my own and be sure to get best performance but also the same version across the complete system.

like image 131
Fleshgrinder Avatar answered Nov 01 '22 04:11

Fleshgrinder


Replacement for PHP versions lower than 5.5

https://github.com/Antnee/phpPasswordHashingLib

like image 4
Slawa Avatar answered Nov 01 '22 02:11

Slawa