phpass 框架-错误
我测试了 phpass 框架,在示例中[演示中的一到四],它们工作没有任何问题。
但在示例 5 和 6 中,我收到错误“发生错误(密码错误(检查失败))”。当我尝试创建新用户时
,我只是测试演示,没有做任何更改
有什么问题吗?
I test the phpass framework, and in the examples [one to four in the demo], they work without any problem.
But in the example 5 and 6 I receive an error "An error occurred (Bad passphrase (check failed))." when I attempt to create a new user
I just test the demos, I don't do any alteration
What is the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您似乎正在关注奇怪的独立所谓“教程”文章phpass 作者不久前写的。我说“所谓”是因为它根本不是教程,而是一篇关于在 PHP 中设置身份验证系统的最佳实践的长文。
教程代码不是库的一部分,遵循它不会帮助您更有效地使用库。 > 尽管如此,这是一篇好文章,实际上值得阅读和理解。
错误
Bad passphrase (check failed)
来自pwqcheck
函数,该函数尝试通过该名称查找外部二进制文件。该错误可以通过提供低质量密码或无法让程序执行来触发。这是一个相当糟糕的设计,因为不清楚发生了什么。请返回文章并从头开始重新阅读。如果您错过了该函数中发生的事情的详细信息(或者在这里向您解释它并没有立即告诉您必须做什么)来解决问题),那么您将需要从头开始,以确保您没有错过任何其他细节。
You seem to be following the bizarre stand-alone so-called "tutorial" article that the phpass authors wrote a bit ago. I say "so-called" because it's not a tutorial at all, but a lengthy article on best practices when setting up an authentication system in PHP.
The tutorial code is not part of the library, and following it will not help you use the library more effectively. Nevertheless, it's a good article and is actually worth reading and understanding.
The error
Bad passphrase (check failed)
is coming from thepwqcheck
function, which attempts to find an external binary by that name. The error can be triggered either by providing a low-quality password or by failing to have the program execute. This is a rather poor design because it's not clear what's going on.Please go back to the article and re-read it from the top. If you missed the detail on what's going on in that function (or having it explained to you here did not immediately tell you what you must do to resolve the problem), then you're going to want to dive back in from the beginning to ensure that you have not missed any other details.