[Admin Edit: moved from the sessions sticky thread]
Quick Question.
I know sessions work different with register_globals on and off. I'm not quite sure i understand how they work differently. I run an internet game of my own server and i leave register_globals off. However, I also develop internet games for other people where they can just install them on their servers. I'm hhaving trouble writing a login script using sessions where it doesn't matter if register globals is on or off. Any suggestions?
Sessions and register globals
Moderator: General Moderators
It shouldn't matter if you explicit use $_SESSION for all session data, as Jason posted above..
Edit/Add: If you NEVER user $blah and ALWAYS use $_SESSION['blah'] when setting and reading session data, there is no way register_globals makes a difference, if so it would be a bug in PHP i believe...
Edit/Add: If you NEVER user $blah and ALWAYS use $_SESSION['blah'] when setting and reading session data, there is no way register_globals makes a difference, if so it would be a bug in PHP i believe...
Last edited by Stoker on Sun Mar 02, 2003 5:05 pm, edited 1 time in total.
Actually, I think there is a difference.
In my game, if i turn register_globals on and you log in as PHP you are taken to the account that is actually for the member ASP...etc. Its like the sessions aren't corresponding to the right member, even though i start a new one for EVERY member. There has to be a difference if this is only happening to me with register_globals on.
Jade
In my game, if i turn register_globals on and you log in as PHP you are taken to the account that is actually for the member ASP...etc. Its like the sessions aren't corresponding to the right member, even though i start a new one for EVERY member. There has to be a difference if this is only happening to me with register_globals on.
Jade
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Well, then I have no clue why my sessions won't work with register globals on. I have over 1k members on my site and when i tried installing a chat that required register_globals to be on my members were logging in and then their sessions were screwing up. If you have any clues why, let me know. It would help lots.
Jade
Jade
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK