The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Session loss switching from domain to www.domain

Discussion in 'General Discussion' started by simpleupdates, Jul 1, 2008.

  1. simpleupdates

    simpleupdates Member

    Joined:
    Jan 17, 2005
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Hi all,

    A while back we started experiencing sessions not spanning to the root domain any longer.

    A session opened on domain.com reveals as no session on the www.domain.com and vise versa.

    I am wondering if there is a setting that could allow sessions to again "work" with or without the www.

    Thanks for any tips!


    Environment: PHP5.2.5, Apache 2.x, WHM 11.23.2 cPanel 11.23.3-R25946
     
    #1 simpleupdates, Jul 1, 2008
    Last edited: Jul 1, 2008
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    194
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Sessions on what, your website? What software is the site running?
     
  3. simpleupdates

    simpleupdates Member

    Joined:
    Jan 17, 2005
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Hi there,

    All sites on the server seem affected equally. We have a CMS, and if the client logs into the CMS using the root domain.comm, the session is properly created, and the person remains logged in while browsing the site and the CMS functions. Then if one of the links of the site may be hard coded to the www.domain.com, it looses the session and the user is no longer logged in. The CMS uses php.

    Thanks
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    194
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Which CMS? Sounds like a setting in the software of the CMS to me.
     
  5. simpleupdates

    simpleupdates Member

    Joined:
    Jan 17, 2005
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Session issue

    Hi there,

    I have reproduced this issue with simple files that open a session (self made).

    The issue is not made more complex -- obfuscated by a CMS.

    Has anyone else noticed similar behavior?

    Thanks!
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The only times I've encountered this issue was a result of flawed code used for issuing cookies/sessions.
     
Loading...

Share This Page