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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session oddities

Status
Not open for further replies.

Chucklez

Programmer
Jul 25, 2002
104
0
0
US
Not sure if I should put this here or somewhere else, but it deals with php, so I will start here. I have a site with a portal that leads to a gaming area and a forums area. The same session for the forum is used in the gaming area.

What is happening is this: When a certain user logs into the forums or the portal, a session is created on the server. This session stays created and stays the same throughout his entire time on the site. I can go into the tmp folder on the server and actually see the session file created. NOW, when he tries to login to the gaming area, the session variable stored on the server is overwritten with a blank file, and has a new session number. Since his member number is stored in the session file, and when he logs onto the gaming area the session file is overwritten with a blank file, the php code behind the scenes cannot get the member number, therefore cannot provide the info necessary to show him his player data.

Since this works for everyone else, and I cannot find anything similar to this on google, I almost believe it is a browser setting on his end. But it works for everything else for him BUT logging onto player interface.

This individual is in singapore, and this only happens on his computer. When he is running IE, FF, or chrome.

My server stats:
Windows NT WEBSERVER01 5.0 build 2195
PHP Version 5.2.4
Xampp
MySQL DB
 
Is there another subdomain for the forum? For instance, if you have for the normal portal entry, forum.example.com for the forum and gaming.example.com, he may be one of the few people who logs in into the forum directly (getting a cookie for forum.example.com), which gives a narrower login. The other people would then login on which would then be configure to issue cookies for *.example.com

It may also be http / https issue with "secure cookies" enabled, where he manages to log in on http and having a non-secure cookie.

If it is a rare phenomenon (not easily reproduced with that user), it could also be a session timeout.

My other though is that there is a page that does not do a "session_start", but I think that would have totally different consequences. Anyway, if you find out what is causing the problem, please let us know. I'm curious...

+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
As far as I can gather from members who have responded, this is an issue that is unique to him. We have tried to have him login via the portal and via the forums themselves and still no luck. As far as the frequency of this, it happens all the time. He can login and browse thru the forum all day long, but the minute he tries to login thru the games section, it overwrites his session file with a blank file. no data at all in it. 0kb.

I am using the script that came with the forum software to perform logins and logouts. I have checked all cookie paths, and it appears fine.
 
..., but the minute he tries to login thru the games section,...

That's funny. Should he log in into the game part while he already has the forum login active? And if he logs in, doesn't that renew the session? It is good practice to use a different session for each change in permissions.

So I can imagine that the code clears the old session and gives him a new one when he tries to log in into a part he already has access to.

Is it possible to just go to the gaming part of the site or does everybody has to log in for the gaming part when already logged in into the forum?

+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
everyone has to login to go to the gaming part. The member db that is used is the forums, so everything is tied into that.
 
I have a simular issue. I wrote a portal for work and everybody is able to login except the VP.

What I found if you open My Computer > Favorites then login the session will be created properly but then a 2nd session will be created with 0k. This only happends when you use My Computer or File Explorer.

Also, when you open the browser in this manner it treats the group as a folder and does not group the window with other windows opened by IE.

I am leaning towards a IE bug. See if your user is doing the same thing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top