password_hash不支持怎么办

What should I do if password_hash isn't supported

我有一个运行 PHP 5.4.x 的 Web 服务器,这意味着它不支持 password_hash 函数,所以我无法对密码进行哈希处理。 我无法升级 PHP 版本。

如何在没有 password_hash 功能的情况下 保护 密码?

你应该看看https://github.com/ircmaxell/password_compat

This library is intended to provide forward compatibility with the password_* functions that ship with PHP 5.5.

看看crypt function

您也可以在 PHP (5.3.7+) 的旧版本中使用 password_compat. It's a backward compatible library to emulate password_hash()