PHP Sessions data lost when changing directory?
Posted
by Ineffable
on Stack Overflow
See other posts from Stack Overflow
or by Ineffable
Published on 2010-04-24T19:49:57Z
Indexed on
2010/04/24
19:53 UTC
Read the original article
Hit count: 183
I've got a simple login system using PHP sessions, but just recently it seems that if you visit pages not in a certain directory (/login/) you will always be flagged as not logged in, even when you are. It seems that my session data is being lost when I change directories (say, to /login/user/).
I don't think I've touched the code myself since the problem appeared, is there something my web host could have done to my PHP installation that would delete the session data, and is there a workaround?
© Stack Overflow or respective owner