PDA

View Full Version : Sessions



Moh
23-08-2008, 10:28 PM
Well I have 2 panels open, one is our DJ Panel, and the other is our new user system.

They both use sessions, there session ids are all different.

But, if I log into the DJ Panel, then I cant use the user system because if I use the user system and dj panel at the same time, the session ends :S

Any idea why this is happening?

Moved by Invent (Forum Moderator) from Designing & Development: Please post in the correct forum next time, thanks :).

Excellent1
23-08-2008, 10:30 PM
Are you starting the sessions on both features?

Moh
23-08-2008, 10:34 PM
Are you starting the sessions on both features?
They both have there own sessions.
I read that if a PHP script is running in the background, you have to use session_name();

Erm, I have no idea how to use this though xD

Oh, that was easy.
Instead of using just session_start(), you add session_name("name") just before each of them.

So I solved the problem.. well not on my own :)

Excellent1
23-08-2008, 10:42 PM
They both have there own sessions.
I read that if a PHP script is running in the background, you have to use session_name();

Erm, I have no idea how to use this though xD

Oh, that was easy.
Instead of using just session_start(), you add session_name("name") just before each of them.

So I solved the problem.. well not on my own :)Yeah was going to say you're probably connecting to the same database? just different tables :P so the session is logging you into one feature and out of the other because you're not identifying anything :P

Baving
24-08-2008, 12:10 AM
regenerate the session ID

Dentafrice
24-08-2008, 12:20 AM
Not sure if it has been asked, but are both sessions named the same? ;P


regenerate the session ID

If you do that, isn't it going to log you out of one or the other?

Want to hide these adverts? Register an account for free!