i facing strange issue here.
i using cakephp 1.3.6 & ie 6-7-8 not allowing me login. using correct credentials. tested these recorded in logs.
there no auth error displayed. (if use wrong credentials shows auth error, correct credentials shows nothing :( )
i have tested possibility auth component logging logs error.log file.
i checked auth->user method. populates auth session, though not redirecting me desired location. checked authloginurl : aslo correct in logs.
i have checked following possibilities,
1) changed settings core.php
-- session.checkagent set false -- security.level set low -- session.start set false
2) used disablecache() login action avoid caching of login data in browser.
3) after logout have destroyed session.
here 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 $this->auth->loginerror = "invalid username or password"; $this->auth->autherror = "sorry, must logged in 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 same problem, different cake version, maybe solution help.
in config made my_session.php
file following values:
ini_restore('session.referer_check'); ini_set('session.use_trans_sid', 0); ini_set('session.name', configure::read('session.cookie')); ini_set('session.cookie_lifetime', 0); // cookie path '/' if app within sub // directory on domain $this->path = '/'; ini_set('session.cookie_path', $this->path); ini_set('session.cookie_domain', env('http_base'));
the important part $this->path
value, sessions available whole domain.
in core.php
sessions add:
configure::write('session.save', 'my_session');
hopes helps!
Comments
Post a Comment