简体   繁体   English

在主机上登录Lithium无效

[英]login in Lithium doesnt work on host

I'm using default settings in Lithium, default adapter is php, everything is quite default. 我在Lithium中使用默认设置,默认适配器是php,所有内容都是非常默认的。 On my localhost I can login, add users, but when I copied everything to my host (fixed all db errors) I can't login. 在我的本地主机上,我可以登录并添加用户,但是当我将所有内容复制到主机时(修复了所有数据库错误),我无法登录。 The code is fine. 代码很好。

Now I can make users and everything works except login. 现在,我可以使用户登录,并且除登录外其他所有功能均可用。 It seems that it can't find username/password in db that match inputs becouse it shows me an error msg - Login failed. 似乎无法在db中找到与输入匹配的用户名/密码,因为它向我显示了一条错误消息-登录失败。 How that's possible? 那怎么可能?

Like I said, everything is default and works on my localhost, if you need to see other code, just ask. 就像我说的,所有内容都是默认设置,并且可以在我的本地主机上运行,​​如果需要查看其他代码,只需询问即可。 controller: http://pastium.org/view/8a23279872e04753b84c93923ad2e61e 控制器: http //pastium.org/view/8a23279872e04753b84c93923ad2e61e

If everything is identical, chances are that you have environment-depending configurations in place (like db connections) or more likely Auth class setup! 如果一切都相同,则很可能是您已经有了依赖于环境的配置(例如数据库连接),或者更有可能是Auth类的设置!

Remember that if you're not on localhost, lithium assumes (by default) that you are in production mode! 请记住,如果您不在本地主机上,锂将默认情况下假定您处于生产模式!

What version are you running? 您正在运行什么版本? Had the same problem before when I ran 0.10 (the .dmg from SourceForge). 在我运行0.10之前有同样的问题(来自SourceForge的.dmg)。 However, if you clone the latest version from GitHub , your should be fine. 但是,如果您从GitHub克隆最新版本,则应该可以。

Also, remember that if you use a " form Auth " – your password will be hashed automatically, remember to store your passwords hashed too. 另外,请记住,如果使用“ form Auth ”,密码将被自动哈希,请记住也将哈希存储在密码中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM