Chris Val Kef Posted November 15, 2006 Share Posted November 15, 2006 Let's get it from the start!I login as USER_A in my system. Everything is ok. Then in the same window of ie7/ff2 i open a new tab and login as USER_B. Everything is ok for USER_B but when i go back to USER_A's tab i'm browshing like i'm USER_B! And at the end when i logout one of them the other ones session is destroyed too.hope you got the problem! I'm using only session_start() and for logout session_destroy().Can you tell how to do this right and working? Link to comment https://forums.phpfreaks.com/topic/27381-session-problem-in-tabbed-browsing/ Share on other sites More sharing options...
kenrbnsn Posted November 15, 2006 Share Posted November 15, 2006 Session are tied to the browser instance, not to the tabbed windows within the instance. You might be able to use a unique session name for each new login.Ken Link to comment https://forums.phpfreaks.com/topic/27381-session-problem-in-tabbed-browsing/#findComment-125217 Share on other sites More sharing options...
Chris Val Kef Posted November 15, 2006 Author Share Posted November 15, 2006 in different windows of ie/ff i don't have the problem. if i got it right you are saying that one instance of the browser keeps one session, so when i open the second tab and login it overwrites the sessions. even if i don't got it right that is what happening... lol!is there any " new session_start()" function ? could this solve the problem? i've tried myself the unique name, unique id etc but still got the problem Link to comment https://forums.phpfreaks.com/topic/27381-session-problem-in-tabbed-browsing/#findComment-125222 Share on other sites More sharing options...
trq Posted November 15, 2006 Share Posted November 15, 2006 A new window in IE actually is a new browser instance, new tabs in FF are still part of the same browser instance. Link to comment https://forums.phpfreaks.com/topic/27381-session-problem-in-tabbed-browsing/#findComment-125223 Share on other sites More sharing options...
kenrbnsn Posted November 15, 2006 Share Posted November 15, 2006 IE7 also has tabbed windows, so it has the same problem as tabbed windows in FF.Ken Link to comment https://forums.phpfreaks.com/topic/27381-session-problem-in-tabbed-browsing/#findComment-125232 Share on other sites More sharing options...
Chris Val Kef Posted November 15, 2006 Author Share Posted November 15, 2006 any ideas how to solve the problem? i don't think it's very serious problem for me (what is the possibility two different users login to my website in the same instance of a browser???? ;-) ) but it's pissing me off when i think about it Link to comment https://forums.phpfreaks.com/topic/27381-session-problem-in-tabbed-browsing/#findComment-125239 Share on other sites More sharing options...
btherl Posted November 16, 2006 Share Posted November 16, 2006 Get and post arguments are tab-specific, so you can use those to differentiate tabs.. it's a hassle to add them everywhere though. You could make a wrapper which generates links with a tab identifier added to each link.But really, why would you want your users to have multiple accounts open in seperate tabs? :) Link to comment https://forums.phpfreaks.com/topic/27381-session-problem-in-tabbed-browsing/#findComment-125324 Share on other sites More sharing options...
Chris Val Kef Posted November 16, 2006 Author Share Posted November 16, 2006 i don't want it. i'm building the system now so i noticed the problem while i was trying some functionalities and it's really pissing me off! Link to comment https://forums.phpfreaks.com/topic/27381-session-problem-in-tabbed-browsing/#findComment-125789 Share on other sites More sharing options...
roopurt18 Posted November 16, 2006 Share Posted November 16, 2006 You're not going to have two users logging in to your site through the same browser on the same PC. If they do, they're just screwing around and it's no big deal.#1 logs in and views welcome page#2 logs in and views welcome page#1 refreshes welcome page and now sees #2's welcome pageThis is in no way a threat or security violation to your site since the two users are sitting right next to each other.Get over it. Link to comment https://forums.phpfreaks.com/topic/27381-session-problem-in-tabbed-browsing/#findComment-125821 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.