Solved

Session Variable dissappears.

Posted on 2004-04-24
6
134 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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

New! My Passport Wireless Pro Wi-Fi Mobile Storage

Portable wireless storage to offload, edit, and stream anywhere.

High-capacity, wireless mobile storage designed to accompany professional photographers and videographers in the field to easily offload, edit and stream captured photos and high-definition videos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
website does not load without www 12 70
Server specifications for web hosting 7 90
Unsearchable in Google,Yahoo and Bing. 6 57
Website URL redirection 10 61
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

929 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

12 Experts available now in Live!

Get 1:1 Help Now