Of course, I meant to write "If you have *them* login, write out their
username with the values" rather than "If you have *then* login".

And lest anyone feel cheeky about my saying CFLOG was "new", I meant that
with respect to someone (like Sam) working on CF5, which is the release in
which it was introduced.

/charlie

> -----Original Message-----
> From: Charlie Arehart [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 06, 2003 6:26 PM
> To: CF-Talk
> Subject: RE: Session Variables Dropping
>
>
> Do you mean one session variable among many, or all session
> variables, for a
> given user? When all the user's session variables "disappear", it's often
> simply because the session key (CFID and CFTOKEN) for the user is
> changing.
> These are usually managed (passed from request to request) by way of
> cookies.
>
> This sudden "disappearance" usually is caused by something causing those
> cookies to be lost, so that CF creates new values for them and the link to
> the old session variable values is lost.
>
> Could this be a situation where the user experiencing the loss is
> not using
> cookies? Are you coding to anticipate that?
>
> Might they have cleared their cookie cache? Or be using a
> filtering or other
> program that might be blocking or "eating/deleting" their cookies? Might
> they be behind a proxy that's either blocking or hiding them? Or
> causing the
> same values to be shared by many users? Could they have logged
> off one user
> on their machine and logged on with another, which would cause
> them to have
> new cookies? Or might they have moved from one computer to another during
> their "session" thus losing their cookies?
>
> Here's a simple test: since you're using CF 5, you have access to the new
> CFLOG tag. Write out a log entry (to a file of your choosing) the
> values of
> the user's CFID and CFTOKEN, and some identifying characteristic for the
> user, to see if the values of CFID/CFTOKEN are changing for them when the
> sessions appear to be "lost". If you have then log in, write out their
> username with the values. Assuming you had a session.username value, you
> could try:
>
> <cflog text="#session.username# #session.URLtoken# #cgi.remote_addr#"
> file="CatchSessErrors" type="Information" thread="yes" date="yes"
> time="yes"
> application="yes">
>
> This will only work as offered if you have a variable called
> session.username. If not, remove that reference in the TEXT attribute. It
> will write an entry to a file called CatchSessErrors.log in the log
> directory where CF is installed: in CF 5, that is. In CFMX, the
> directory's
> called logs (as in cfusionmx\logs), and in BlueDragon, it's in the
> BlueDragon Server's work\cflog directory.
>
> It's writing out session.URLToken, which is a reserved variable
> in CFML for
> the session key (the CFID/CFTOKEN pair in CF 5).
>
> If you're not having them log in to give you any unique username,
> you could
> try their IP Address (cgi.http_host), which is offered in that example as
> well. The only risk there is that if they're using a Proxy, you
> may see the
> same values of IP address for the given CFID/CFTOKEN even if it's multiple
> users. As a last resort, you could write out (or create a hash of) their
> cgi.remote_user, cgi.http_user_agent, and cgi.http_accept, to try to
> distinguish users reported as having the same IP address.
>
> Anyway, the whole point of the exercise is to see if the same user (best
> indicated by some login username or their IP address) is getting different
> session tokens (CFID/CFTOKEN, as represented in session.URLToken). If they
> are, then there's something wrong on their end, not likely with
> your code at
> all.
>
> If you don't have access to the log files, you could write out to
> a separate
> file in the application directory with CFFILE. And if that's restricted,
> just drop back to using CFOUTPUT to write the values to the screen for the
> user to report to you. They and you will now have to track them
> over time to
> detect when the problem arises, but it's a solution.
>
> If you don't want that ugliness appearing on screen, you could
> have it done
> only in a special template that they call (the session variable issues
> should apply to all templates in a given directory), or you could
> write them
> to the screen in a way that's hidden unless they highlight it
> (such as using
> <font color="white"> if outputting on a white screen, or using
> stylesheets).
>
> Hope any of these tips may help. Sounds like fodder for me to
> come up with a
> new article! :-)  I'll look forward to hearing what others have to say on
> the subject.
>
> /charlie
>
> > -----Original Message-----
> > From: Sam Komolafe [mailto:[EMAIL PROTECTED]
> > Sent: Friday, June 06, 2003 5:40 PM
> > To: CF-Talk
> > Subject: Session Variables Dropping
> >
> >
> > Hi,
> >
> > Why could session variables be dropping intermetently on my app.
> > The variables are properly locked. On each page I localize the
> > variables by moving them to a local scope. Once in a while, this
> > local variables which should always be there are not found.  I am
> > using CF5 Pro on a Win2000 Server.
> >
> > Thanks
> > Sam
> >
> >
> >
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to