470,815 Members | 1,353 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,815 developers. It's quick & easy.

PHP switching sessions

Hello,

I am using multiple instances of IE on the same machine to test a web
site I've created. The web site can be accessed by multiple user type
each with different access rights (e.g. Admin and User). Sometimes
what I see happening is that the User session switchs to Admin session
and vice versa. The web server is using cookies to communicate session
info and I thought this should be relatively foolproof. Any ideas how
to prevent this from happening? Thanks in advance,

Slav

Jan 4 '06 #1
2 1484
OK, what you write makes sense. However, at work I am using the same
type of setup. A user is authenticated, a session is started and the
user can navigate through the online application. At work, I can have
multiple IE browsers open and during the last 2 years, never have I
seen the problem of the session switching between users. Even on my
own application, I do not see this problem every time. It happens
every so often. Meaning I had as many as 4 IE windows open connecting
to my on-line application and never saw a switch. Then it happens out
of the blue. Now the differences between my work application and
private application:
Work: Linux running Apache with a https sessions
Home: Windows XP running Apache with no security

Thanks again,

Slav

Michael Vilain wrote:
In article <11*********************@g43g2000cwa.googlegroups. com>,
Slav


If I understand your situation, if IE is running on the same machine
with the same IP address and user, I don't see a way to do what you're
trying to accomplish--separate instances using the same browser. Now,
if you have two different browsers (say, IE and FireFox), that would
probably work as cookies are usually stored in separate places. Or use
separate user accounts (if your OS allows multiple logins) as the cookie
files are in different directories. But the web server (and php) has no
way to distinguish connections coming from the same machine. Only the
client browser differentiates that. So, unless you use a different
user, browser, or machine, you're pretty much stuck with the behavior
you see.

--
DeeDee, don't press that button! DeeDee! NO! Dee...


Jan 4 '06 #2
Well, it's not that simple. The web server, at work, is running PHP on
Linux but I'm accessing it through multiple IEs all on a Windows
machine. My pet theory is that the secure connection somehow allows
the server to differentiate between the multiple IE instances.
Initially I thought it had something to do with the cookies sent by the
server to the browser. 1 basic thing I would like to know is if you
have n IE instances open on the same machine connected to the same
server using PHP session, do you get n cookies or just 1? If it's 1
then it would make sense that the browsers get confused.... Thanks.

Jan 5 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by jing_li | last post: by
1 post views Thread by Kenneth Keeley | last post: by
3 posts views Thread by Maxime Ducharme | last post: by
3 posts views Thread by Will Woodhull | last post: by
12 posts views Thread by D. Shane Fowlkes | last post: by
6 posts views Thread by Daniel Walzenbach | last post: by
Atli
2 posts views Thread by Atli | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.