I am facing a strange issue here.
I am using CakePHP 1.3.6 & for IE 6-7-8 it is not allowing me to login. I am using the correct credentials. tested these with recorded in logs.
There is no any auth error displayed. (If i use wrong credentials then it shows the auth error, but for correct credentials it shows nothing 🙁 )
I have tested all the possibility with auth component by logging logs into the error.log file.
I checked the Auth->user method. It populates Auth session, but even though it is not redirecting me to the desired location.
I also checked the authLoginurl : it is aslo correct in logs.
I have checked the following possibilities,
1) Changed some settings from Core.php
— Session.checkAgent set to false
— Security.level set to low
— Session.start set to false
2) used disableCache() for login action to avoid the caching of the login data in browser.
3) After logout i have destroyed the session.
Here is the code,
App Controller in beforeFilter :
$this->Auth->loginAction = array(‘controller’ => ‘users’, ‘action’ => ‘login’);
$this->Auth->loginRedirect = array('controller' => 'users', 'action' => 'myaccount');
$this->Auth->userScope = array('User.is_active' => '1', 'User.is_verified' => '1');
//$this->referer();
//auth errors //add it
$this->Auth->loginError = "Invalid username or password";
$this->Auth->authError = "Sorry, you must be logged in to visit these pages";
//logout
$this->Auth->logoutRedirect = array('controller' => 'users', 'action' => 'login');
User Controller beforeFilter() :
function beforeFilter() {
parent::beforeFilter();
$this->Auth->allow(allowed_actions);
}
Thnaks,
Vijay
I’ve had the same problem, it was with a different cake version, but maybe this solution will help.
In config I made a
my_session.phpfile with the following values:The important part is the
$this->pathvalue, sessions are now available for the whole domain.In
core.phpfor sessions add:Hopes this helps!