Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 268
  • Last Modified:

Session Problem

hi guys,

I am using php4.3.4 version.
In my application, I have been creating session variable during the login process. (i.e $_SESSION['login_name']).

When I login with multiple users in the application with same system (computer), I have been facing the the session variable values are exchanging

What i need to clarify is:
-- How my system (computer) identifies different session variables?
-- Is there any connection with my local setting to SESSION? (ofcourse

SESSION will be created at server)
-- Is there any relationship with client , session variables?

 Thanks for advance
0
Loganathan Natarajan
Asked:
Loganathan Natarajan
  • 2
1 Solution
 
donelCommented:
Hi Friend!

You may try other browser, this mean one browser one account name for login.
so, you may not got the problem and if you don't i am not sure if another way can do.


this what i have tried to do with multiple login account in one system.

thanks & best regards,
bj mac donel
0
 
donelCommented:
I forget to tell you what i have used.

1/ i.e
2/ firefox
3/ opera

so, i can login 3 account on my computer with different session.

I think only this way.

0
 
Marvin_CarredoCommented:
i concur with donel and i think that it  depends on your browser, browsers have different behavior in handling with sessions, try to run the code below on different browsers(2 windows for firefox, 2 wndows for opera, 2 windows for IE6) notice that the 2 fire fox browsers displays the same session id and so with opera, while the 2  IE browsers  produces 2 different session id.

==========
<?php
session_start();
echo "Session ID: ".session_id();
session_destroy();
?>
0
 
virmaiorCommented:
reference: http://us2.php.net/manual/en/ref.session.php

What i need to clarify is:
-- How my system (computer) identifies different session variables?

a session is identified by a cookie sent to your computer that only contains the session id.  Alternately if cookies are disabled then it adds it to the url.  But most browsers are designed to handle it transparently.  
This id helps to determine a filename (or db unique id) where the session information is stored [the default configuration of PHP uses files to store its session information and places them in a temp directory; you can configure PHP to use a DB to store session information).


-- Is there any connection with my local setting to SESSION? (ofcourse SESSION will be created at server)

turning off cookies can frustrate the SESSION system depending on your computer.  And your computer has to send the session id to maintains its identity.

-- Is there any relationship with client , session variables?

Yes, see above.  
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now