problem - 2 session id's at once causes loss of session

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • BobJohn

    problem - 2 session id's at once causes loss of session

    I've been having a very weird problem for a while now. About 1% of
    the time, people lose their sessions. Through logging I have
    discovered that a lot of these people are getting 2 conflicting
    session id's. What is throwing me for a loop is this:
    Lets call the session id's aaaaa and bbbbb

    session_name() is standard, "PHPSESSID"
    session_id() is aaaaa
    the URL contains no session info
    the session cookie $_COOKIE[session_name()] is bbbbb
    $_POST[session_name()] is bbbbb

    So how on earth did session_id() get set to aaaaa?
    Is session_start() somehow ignoring the cookie?

    I'm using the latest release, php 4.3.4

  • Shawn Wilson

    #2
    Re: problem - 2 session id's at once causes loss of session

    BobJohn wrote:[color=blue]
    >
    > I've been having a very weird problem for a while now. About 1% of
    > the time, people lose their sessions. Through logging I have
    > discovered that a lot of these people are getting 2 conflicting
    > session id's. What is throwing me for a loop is this:
    > Lets call the session id's aaaaa and bbbbb
    >
    > session_name() is standard, "PHPSESSID"
    > session_id() is aaaaa
    > the URL contains no session info
    > the session cookie $_COOKIE[session_name()] is bbbbb
    > $_POST[session_name()] is bbbbb
    >
    > So how on earth did session_id() get set to aaaaa?
    > Is session_start() somehow ignoring the cookie?
    >
    > I'm using the latest release, php 4.3.4[/color]

    Is it possible they're switching from one subdomain to another somehow (i.e. the
    session in set at http://yoursite.com, but then one of your links takes them to
    http://www.yoursite.com)?

    Just a shot in the dark,
    Shawn
    --
    Shawn Wilson
    shawn@glassgian t.com

    Comment

    • BobJohn

      #3
      Re: problem - 2 session id's at once causes loss of session

      On Tue, 09 Dec 2003 12:57:38 -0400, Shawn Wilson
      <shawn@glassgia nt.com> wrote:
      [color=blue]
      >BobJohn wrote:[color=green]
      >>
      >> I've been having a very weird problem for a while now. About 1% of
      >> the time, people lose their sessions. Through logging I have
      >> discovered that a lot of these people are getting 2 conflicting
      >> session id's. What is throwing me for a loop is this:
      >> Lets call the session id's aaaaa and bbbbb
      >>
      >> session_name() is standard, "PHPSESSID"
      >> session_id() is aaaaa
      >> the URL contains no session info
      >> the session cookie $_COOKIE[session_name()] is bbbbb
      >> $_POST[session_name()] is bbbbb
      >>
      >> So how on earth did session_id() get set to aaaaa?
      >> Is session_start() somehow ignoring the cookie?
      >>
      >> I'm using the latest release, php 4.3.4[/color]
      >
      >Is it possible they're switching from one subdomain to another somehow (i.e. the
      >session in set at http://yoursite.com, but then one of your links takes them to
      >http://www.yoursite.com)?
      >
      >Just a shot in the dark,
      >Shawn[/color]

      Nope, good guess though!

      Comment

      Working...