Logout issue in subdomain

Hi I am facing a weird problem. Not sure exactly if it a problem or desired behavior.

I have a website built with Yii 1 framework. Now we needed to support subdomains on website.

Since to share session across subdomains Yii recommends to add following configuration to main.php

'session' => array(

       'class' => 'CDbHttpSession',

       'cookieParams' => array(

           'domain' => '.domain,com'



My domain name domain.com and subdomain is user.domain.com

If I logged in from domain.com then its working fine. I am getting all the session data in my user.domain.com. Logout session also working fine. But I have a problem While I am logout from user.domain.com main domain domain.com still logged in. If I refreshed main domain. Again session set in my user.domain.com.

I want to destroy session from all the parent and child domain when I am clicking logout from my subdomain page

Hi Chinmay Sahu,

Have you maintaining the same savePath to all domains?

Please do read the link below for more info


Yes I have maintaining same path to all domains