Solved

Session Variable dissappears.

Posted on 2004-04-24
6
133 Views
Last Modified: 2013-12-24
I'm successful in assigning a Session.auth.username variable I check it once don't change it then when I try to check it again it's no longer their could anyone think of a reason for this?

The example is on http://teamroom.colorado.edu/courses/syst3510/student%20groups/group5/start.cfm

logon as username 1 and password 2
You'll see the ,2, which will mean it recognizes the variable by running a query for your first name 2 and last name which is null essentially in the database.

Then click on My Profile and the session variable is no longer there for username as evidenced by the error message, and the isloggedin session variable is gone as evidenced by the login screen reappearing.  

The two title bars are in an application file as well.

If you need to see the code I'll gladly post it but I think it's more of a logic error then code.
0
Comment
Question by:aaronjhackl
6 Comments
 
LVL 18

Expert Comment

by:Plucka
ID: 10909826
Hi aaronjhackl,

Have you.

1. Setup session variables in Administrator
2. Setup session variables in application.cfm

Post your code and application.cfm

Regards
Plucka
0
 
LVL 18

Expert Comment

by:Plucka
ID: 10909844
aaronjhackl,

Also make sure that the home or profile pages are not reseting this variable.

Regards
Plucka
0
 

Expert Comment

by:PrtyAnimll
ID: 10910223
Aaron,

Perhaps you have your sessiontimeout attribute set too short for the Session variable to exist.  Its arguments are Days,Hours,Minutes,Seconds

It looks like,

sessiontimeout=#CreateTimeSpan(0,0,10,0)#

for a ten minute session.

Ward
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 17

Accepted Solution

by:
Tacobell777 earned 125 total points
ID: 10910956
There could only be a couple of reasons;

1. your browser does not accept cookies
2. the <cfapplication tag if overwritten by another application.cfm (you do have your cfapplication tag in the application.cfm, right?)
3. you overwrite the value somewhere
4. the session timeout is set very short (very very short, but unlikely)
5. you are calling the code before the cfapplication tag is initialized, but that would throw an error
0
 
LVL 20

Expert Comment

by:trailblazzyr55
ID: 10912777
to add on to what Tacobell777 said, make sure your "Application.cfm" where you turn on your sessions looks exactly like this "Application.cfm" when you save it.
0
 
LVL 17

Expert Comment

by:Tacobell777
ID: 10913768
thats if your on linux or any other case sentsitive OS, which I doubt otherwise the sessions would not just work in one page and no tin the other, but still a worthy thing to note.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now