Jump to content

odd glitch/feature?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
Chrisms

Chrisms

    Newbie

  • Members
  • PipPip
  • 28 posts
okay. so, im writing a website for my robotics team. And I finally got around to enabling cookies for long term logins.

Everything works fine. However, when i delete the session cookie from my browser, and refresh. PHP assigns a new session ID, then appends the session id to the URL (?PSPSESSID=blah) It's the NEW session ID, it isn't the one i deleted. I have no idea why.

if i remove the session ID form the url, and hit go, my code works, as it should, and then the links on my page magically lose their session ID suffix.

any clues guys? I'll PM the link to anyone interested. I just don't feel like posting it globally.

cheers,
Chrisms

P.S.- Hey winged panther! miss talking to you(if he's still even here, god if i know)

#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
I haven't worked with sessions much in PHP so I can't tell you how they should work. Someone else here may be able to tell you the answer. Here are some links you may want to read though:

http://www.php.net/session
PHP Sessions

#3
Chrisms

Chrisms

    Newbie

  • Members
  • PipPip
  • 28 posts

Jordan said:

I haven't worked with sessions much in PHP so I can't tell you how they should work. Someone else here may be able to tell you the answer. Here are some links you may want to read though:

http://www.php.net/session
PHP Sessions

it's not that sessions aren't working, they are. I think i know why they are doing this. Perhaps it's some sort of PHP feature so if i have cookies disabled, i can keep track of the session in the URL? thats my best guess, that PHP sees the loss of session cookie as "oh hey, he didn't accept cookies, lets append the session to the URL so he can still be logged in!"

any thoughts?

#4
Lop

Lop

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,172 posts
I've seen this session in the URL. I think you can turn it off somehow but I am unsure of how.

#5
Chrisms

Chrisms

    Newbie

  • Members
  • PipPip
  • 28 posts
can anyone confirm my idea of why it's being put in the URL though? I'm one of those people who hate not knowing why my code is doing random things, haha.