English 中文(简体)
伐木业没有在面包工厂从事某些工作
原标题:Login not working sometime in cakephp

我有客户——前线的加拿大人。

function login() {
 if(!empty($this->data)) {
  # Call function from Customer to insert Registration Data
  $loginData = ClassRegistry::init( Customer )->checkLogin($this->data[ email ], $this->data[ password ]);
  if(isset($loginData) && !empty($loginData)) {
     $this->Session->write( Session.userid ,$loginData[ Customer ][ id ]);
     $this->Session->write( Session.email ,$loginData[ Customer ][ email ]);
     $this->redirect(HTTP_PATH."my-profile");
     exit;
  } else {
     $this->Session->setFlash( Please enter valid Username/Password , default ,array( class => flash_bad ));
 $this->redirect(HTTP_PATH."customer/login");
 exit;
  }
 }
}

以及模式客户。 php,

function checkLogin($email,$password) {
 $loginData = $this->find( first , array( conditions  => array( Customer.email  => $email,  Customer.password  => sha1($password),  Customer.is_active  =>  Yes )));
 return $loginData;
}

大部分时间为Login 工作罚款,但有些时间为零,而且没有工作,也没有信息。 每天只有日复一页。

我只检查了所有这些事情,发现当时我网站上的浏览器显示/应用 >,但我已经把实际的会议路径定在之前行使职能app_ Controller.php上。

我只去掉所有浏览器的海滩,并试图做原木,现在它正在做罚款。

Can anyone explain me what is the issue? it occurs randomly so i can t find root of the issue.

问题回答

你可能提出问题的是,由于把不适当的“ Cook路”转至row子而使会议损失。 可能会随机发生,因为将会议战略与项目设计战略(例如,GT-波段或Kishs)相联。

你错误地设立了<代码>$this->Session->path para amount。 它绘制了PHP选择的session.cookie_path地图。 见ts

<代码>session.cookie_path 不应将礼宾、东道和最终的港口排除在外,因此只剩下网站/:

$this->Session->path =  / ;

另见Domain and Path

www.un.org/spanish/ga/president 为了进一步调查会议错误配置的原因,debug SessionComponent CakeSession 在<代码>以下的班级: 向施工人员提出的论点:

我猜测这种说法是错误的,并收到了<代码>/app/。 浏览器中的 co。





相关问题
why the session in iis automatically log out?

I used iis6, and when i called a function Directory.delete(), the all the session relate this website will be logged out. and i debugged the website, i found no exception. any one have ideas on this ? ...

Check session from a view in CodeIgniter

What is the best way to check session from a view in CodeIgniter, it shows no way in their user guide, otherwise I will have to make two views on everything, which is kinda weird...still a newbie to ...

Can I get the size of a Session object in bytes in c#?

Is it possible to get the size(in bytes) of a Session object after storing something such as a datatable inside it? I want to get the size of a particular Session object, such as Session["table1"], ...

提供严格分类的出席会议物体

提供严格分类的与会机会的最佳方式是什么? 我正计划转而选择矩阵,这正在促使汇编者抱怨我的幻觉方案拟订方法......

PHP Session is not destroying after user logout

I m trying to create an authentication mechanism for my PHP Application and I m having difficulty destroying the session. I ve tried unsetting the authentication token which was previously set within ...