By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,203 Members | 1,392 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,203 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
BobJohn wrote:

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


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
sh***@glassgiant.com
http://www.glassgiant.com
Jul 17 '05 #2

P: n/a
On Tue, 09 Dec 2003 12:57:38 -0400, Shawn Wilson
<sh***@glassgiant.com> wrote:
BobJohn wrote:

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


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


Nope, good guess though!

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.