473,386 Members | 1,644 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

Jul 17 '05 #1
2 2556
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Bartosz Wegrzyn | last post by:
I need help with sessions. I createt set of web site for nav with authorization. first I go into main.php which looks like this: <?php //common functions include_once '../login/common.php';...
10
by: Anthony Williams | last post by:
Hi gang, This one looks like a bug :o( As you may or may not know, setting session management in web.config to use cookieless sessions causes the ASP.NET runtime to munge a session ID into...
1
by: Andrew | last post by:
Hey all, Working on revamping our Intranet here and making use of the LDPA, Active Directory, Directory Services, etc. that .Net provides. I am still fairly new on this subject, so the problem...
2
by: Ricky K. Rasmussen | last post by:
Hi NG, We have a rather large ASP.NET application that uses popups to display various dialogs to the user. In our work we've come over a rather annoying "bug": If we open a modal dialog using...
5
by: Vishal | last post by:
Hello, I already asked this question in the ASP.NET forums, but no help came. So I am hoping that somebody can help me out. This is really very URGENT me. For my e-commerce application, I...
4
by: Urs | last post by:
Two questions: 1) What possibly causes HttpApplication from being unloaded or recycled? 2) How can I prevent HttpApplication from being unloaded or recycled (to prevent loss of session state...)...
3
by: samik | last post by:
I have working on WinXP + IIS 5.0 + .NET 1.1 Whenever i open a page with the url starting as http://localhost/<page addressor http://127.0.0.1/<page addressthe application to hold session...
4
by: mike.biang | last post by:
I have an ASP page that is using an XMLHTTP object to request various pages from my server. I keep a single session throughout the XMLHTTP requests by bassing the ASPSESSIONID cookie through the...
4
by: ddolgoff | last post by:
Hello to everyone, I have a problem of managing a session with cookies and "session_set_save_handler()". I want to use php's built-in session management mechanism with user-level session storage...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.