PHP switching sessions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Slav

    #1

    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

  • Slav

    #2
    Re: PHP switching sessions

    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:[color=blue]
    > In article <1136346431.043 985.98160@g43g2 000cwa.googlegr oups.com>,[color=green]
    > > Slav[/color]
    >
    > 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...[/color]

    Comment

    • Slav

      #3
      Re: PHP switching sessions

      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.

      Comment

      Working...