Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session Cookie - Firefox not maintaining session id

Status
Not open for further replies.

mrsotoole

Programmer
Mar 9, 2005
1
US
When clients running the Firefox 1.0 access any page on the site, a NEW session id is saved in the session cookie (PHPSESSID by default).

We have trans sid turned off, which is default php behavior.
We require that cookies are used for session data.
We have custom session handlers defined. We use MySQL for session handling.
Code:
	ini_set('session.use_only_cookies',1);
	ini_set('session.save_handler', 'user');
This is a problem because it makes logging into the site impossible.

After the login procedure is completed, the corresponding data is saved into the session table.
That data is tied to the current session id that the client holds in the cookie.

When the user navigates to another page in the site, a new session id is stored in the session cookie.

All of the data associated with the 'logged-in user' is now unaccessable for this client.

This leads me to believe that the session cookie is not being included in requests sent to the server. The server thinks this client is new and doesn't yet have a session, so it generates a new session id.

This problem does not happen for clients running IE6.

What are the steps to resolve this problem?
Are there "Gotcha's" with this type of setup that I am unaware of?

Thanks in advance,
Mrs. O'Toole - "Chinese girls do not come with green eyes.
 
could it be that the user has turned off cookies in firefox? these days this is becoming more prevalent. it might be better to relax some of your requirements.

if that is not possible (strange) then you will need to inform users (on the first page that doesn't have session data logged that is not the login page) that they need to enable cookies.
 
We've been running MySQL based sessions with a server farm for several years now and never had that problem. All our developers mainly use Firefox for accessing the scripts and no such behavior has occurred.
This leads me to believe that it is a client side problem. However, here are some more questions that might help shed light on this:
1. What web server software is used?
2. Is it all Firfox visitors?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top