Hello all!
I am trying to share sessions between my yii applications. I already read couple of wiki and forum articles and I can’t get it to work.
This is my config file (same for all the apps)
'id' => 'application',
'user' => array(
// enable cookie-based authentication
'allowAutoLogin' => true,
'loginUrl' => array('site/login'),
'class' => 'MyWebUser',
'identityCookie' => array(
'domain' => '.ct.local'
),
),
'session' => array(
'savePath' => '/temp',
'cookieMode' => 'allow',
'cookieParams' => array(
'path' => '/',
'httpOnly' => true,
'domain' => '.ct.local',
),
),
The /temp folder is accessible and writable. I also extended CWebUser as follow:
<?php
class MyWebUser extends CWebUser
{
public $identityCookie = array(
'path' => '/',
'domain' => '.ct.local',
);
}
So basically when I authenticate on http://intranet.ct.local and go to forum.ct.local it emptys the session for some unknown reasons. Once done, when I hit refresh on the intranet I am not logged in anymore…
Could it be that the DNS entry are wrongly setup? I am really lost regarding this issue any help would be really appreciated.
Thanks.