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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scoping of Session Variables

Status
Not open for further replies.

barrylowe

Programmer
Nov 6, 2001
188
0
0
GB
Looking for a bit of help regarding the scoping of session variables.

I have a couple of old application developed in ColdFusion, both of which store the ID of the person logged in a session variable called session.who

Every page in each of the applications then has an include fiel which checks to see that session.who is not empty. If it is then it redirects the user to a login page.

Each of the applications has a development version and a live version.

In one of the application if you flick between the 2 version it kicks you out to the login screen each time as it won't take the session.who value in the development version as a valid login for the Live version. That is fine and is the behaviour that I would want.

My problem is that in the other application this does not happen. If I am on a page in the development version and then go to the same page on the live site, it does not force me to login again.

I assume this is something to do with the scoping of the session variables but for the life of me I can't see how to fix it.

Any thoughts?
 
Clear your cookies/temp files and try again: Login to your dev box then go to the page on production.
Unless, you use "sticky sessions", you should get to the login page on production.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top