Mysql 身份验证登录在服务器中无法运行cakephp 2.5.7
嗨,大家好,cakephp登录在我的本地主机上工作,但在我的本地主机上不工作 网络服务器。 我的本地主机服务器php版本5.5和mysql服务器5.6。 我的web服务器版本5.2.17和mysql服务器5.1.61-rel13.2-log 下面是我的控制器代码 UsersController.php AppController.phpMysql 身份验证登录在服务器中无法运行cakephp 2.5.7,mysql,cakephp,cakephp-2.5,Mysql,Cakephp,Cakephp 2.5,嗨,大家好,cakephp登录在我的本地主机上工作,但在我的本地主机上不工作 网络服务器。 我的本地主机服务器php版本5.5和mysql服务器5.6。 我的web服务器版本5.2.17和mysql服务器5.1.61-rel13.2-log 下面是我的控制器代码 UsersController.php AppController.php 提前感谢本地和远程主机上的Security.salt和Security.cipherSeed是否相同?密码字段是否有足够的长度来存储哈希密码?是的,Securi
提前感谢本地和远程主机上的Security.salt和Security.cipherSeed是否相同?密码字段是否有足够的长度来存储哈希密码?是的,Security.salt和Security.chiperSeed对于本地和远程主机都是相同的。另外,我们对密码使用了sha1加密方法。您的意思是说您的代码可以在本地工作,但不能在开发服务器上工作?请尝试将调试->启用为1,并检查警告。如果未找到任何内容,请尝试将调试->1切换为0,然后再次切换为1。还可以手动删除tmp文件夹中的缓存。我的调试模式值Configure::write'debug',2;
public function login(){
$this->layout='userlogin';
if ($this->request->is('post'))
{
if ($this->Auth->login())
{
return $this->redirect($this->Auth->redirect());
}else{
$this->request->data=array();
return $this->Session->setFlash('Invalid username or password, try again','default',array('class'=>'alert alert-danger'),'logerr');
}
}
}
public $components = array(
'RequestHandler','Session',
'Auth' => array(
'loginRedirect' => array('controller' => 'Users', 'action' => 'UserDashboard'),
'logoutRedirect' => array('controller' => 'Users', 'action' => 'login'),
'authError' => 'Did you really think you are allowed to see that?',
'authorize' => array('Controller'),
)
);