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!

Session variables

Status
Not open for further replies.

r0nke

MIS
Jul 17, 2003
60
0
0
US

Has anyone had problems with session variables disappearing?

When I try processing a page, coldfusion says the session is undefined but that same session works in the previous page.

I get the session undefined error like once every other day. The site never changes, the code never changes but for some reason sometimes I get the undefined error message.

I dont understand why it would work sometimes and not all the time.

Any ideas please?
 
Are cookies enabled in the browser?


Hope This Helps!

ECAR
ECAR Technologies

"My work is a game, a very serious game." - M.C. Escher
 
make sure your cfapplication tag which sets up sessions is in your application.cfm file (or application.cfc for 7)

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
And Truth said make sure you have something like this in your application.cfm or cfc

<cfapplication name="Foo" clientmanagement="yes" sessionmanagement="yes" sessiontimeout="#createtimespan(0,0,1,0)#">
 
Thanks for the response.

All the above were correctly set up in application.cfm.

What I mean is, say a website has 10 pages, the session variables are all set in page 1, page 2, 3 and 4 all use these session variables. Suddenly in page 5, it says those session variables were not defined.

This same website is used by 60 people a day, and maybe 2 of these visitors will suddenly get session not defined. Not straigt away but somewhere in subsequent pages, the sessions just disappear.

I think if cookies are not allowed, page 2 wont work. But the problem is during the user navigating thru the site, suddenly the session variables disappear. Even though the previous page was able to call the session correctly.

This is my problem.

Thanks

 
are you sessions locked? are you sharing an application name with another application?

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
Have you asked these users if they're letting the sessions time out? If I'm using the sessions on page 5, then I go to lunch, then a meeting, and I get back to my PC 2 hours later and try to take up where I left off and go to page 6 the sessions would be expired.


Hope This Helps!

ECAR
ECAR Technologies

"My work is a game, a very serious game." - M.C. Escher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top