Ceeee
Ceeee

Reputation: 1442

PHP Fatal Error: Call to undefined function password_verify()

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?

Upvotes: 7

Views: 29075

Answers (2)

Slawa
Slawa

Reputation: 1217

Replacement for PHP versions lower than 5.5

https://github.com/superandrew/phpPasswordHashingLib

Upvotes: 4

Fleshgrinder
Fleshgrinder

Reputation: 16273

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.

Upvotes: 13

Related Questions