Hi all,
On my site I use session variables to store user information (to keep them logged in and what not). Nothing special.
However, I was thinking about something today and I'm not sure how it works. Let's say I have two web-sites hosted on my account, in separate folders. Will those two sites share the same session variables, or will php create a new session when a user accesses each site?
If they share sessions, it could cause problems with logging in. For example, someone goes to Site A and logs in. They then go to Site B and the session shows they are logged in, but they don't necessarily have an account there (or the user-id doesn't match up).
I tried running some little test scripts and it seems that php creates a new session in each folder, but I was wondering if anyone knew for certain.
- Walkere
On my site I use session variables to store user information (to keep them logged in and what not). Nothing special.
However, I was thinking about something today and I'm not sure how it works. Let's say I have two web-sites hosted on my account, in separate folders. Will those two sites share the same session variables, or will php create a new session when a user accesses each site?
If they share sessions, it could cause problems with logging in. For example, someone goes to Site A and logs in. They then go to Site B and the session shows they are logged in, but they don't necessarily have an account there (or the user-id doesn't match up).
I tried running some little test scripts and it seems that php creates a new session in each folder, but I was wondering if anyone knew for certain.
- Walkere
