Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

session variables

Status
Not open for further replies.

ushas

Technical User
May 20, 2002
8
IN
Hi,

- php 4.0.4 and PostgreSql

I have a problem with session variable using netscape/konqueror,which is working perfectly in IE.

when i open the site in konqueor,the session variable say '$username=sat' is set.when the other instance of site is opened ,the session variable '$username=ush' overrides with the first instance and the first instance is also having the variable set by the 2nd instance.

why is it happaning?can you please guide me.

regards,
usha.s

 
I'm sorry, but I do not understand your question.

You open a page, which sets a session variable. Then you open a second page, which sets that same session variable to a different value.

From there, you lose me. Want the best answers? Ask the best questions: TANSTAAFL!
 
I am working in apache1.3,php 4.04,postgreSql 7.0.3,
and red hat linux 7.1.

our application first starts with a user authentication screen,when the first user logs in (say user1),depending on his rights he will be able to use some screens.session variable is assigned as $user=user1.

and when other user logs in (say user2),the session variable will be set for the new instance $user=user2.

the problem is:

1.in netscape4.76/konqueror/mozilla session variable of the first instance $user has also been changed to user2.


2.i get same sessionid's in both instance?

it is not so in IE.why is it happaning,please do help me.
 
Long shot:
Are you using instances of the same browser on the same machine?
Mozilla tabs for example from the same browser instance use the same PHP sessionID. SO, no matter which of the tabs sets the session variable, it will be changed.
To create distinct sessions it is best to use different browsers.
 
yes,

is it handled in the newer versions properly?if so please let me know the browser version of mozilla,netscape,konqueror.

 
It should be handled that way. If you set a cookie and you want to change that value, the browser shouldn't stop you. //Daniel
 
As danielhozac says,

this is the way it should work.
One browser, one session - even if there are multiple windows open. It appears to 'work' in any browser if there are distinct instances running because they are distinct.
An application that uses sessions and has multiple tabs open needs to have the same PHP sessionId to work properly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top