Yii Framework Forum: Logout issue in subdomain - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Logout issue in subdomain Unable to logout in subdomain Rate Topic: ***** 1 Votes

#1 User is offline   Chinmay Sahu 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 30-March 17

Posted 14 December 2017 - 05:43 AM

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
Chinmay Sahu
Senior Software Engineer
Muvi - Launch your video platform in 1-Click
www.muvi.com
Recognized as “Enterprise OTT” platform of the year by FierceOnlineVideo
0

#2 User is offline   Arockia Johnson SR 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 202
  • Joined: 25-June 13
  • Location:Singapore

Posted 15 December 2017 - 04:36 AM

Hi Chinmay Sahu,

Have you maintaining the same savePath to all domains?

Please do read the link below for more info


http://www.yiiframew...ple-subdomains/
மகிழ்ச்சியாக குறியிடுங்கள்!..... Happy Coding!.....


Thanks & Regards,
ஜான்சன் ( Arockia Johnson SR )
www.arojohnson.tk

Hit (+) button If my replies really helped you!
0

#3 User is offline   Chinmay Sahu 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 30-March 17

Posted 15 December 2017 - 05:18 AM

View PostArockia Johnson SR, on 15 December 2017 - 04:36 AM, said:

Hi Chinmay Sahu,

Have you maintaining the same savePath to all domains?

Please do read the link below for more info


http://www.yiiframew...ple-subdomains/

Yes I have maintaining same path to all domains
Chinmay Sahu
Senior Software Engineer
Muvi - Launch your video platform in 1-Click
www.muvi.com
Recognized as “Enterprise OTT” platform of the year by FierceOnlineVideo
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users