Topic: Where did it Go... My session that is..


jarottman    -- 02-02-2005 @ 11:24 AM
  I have a table that calls the username and password so that a user can log in. It then stores a session var called userID. I then pull that user id from anotehr table (it has the field)to display information just for that user. Everything works fine when I load single pages the var is called correctly, but when I try to use that var in an include those pages do not load at all..

Any ideas??

This message was edited by jarottman on 2-2-05 @ 11:34 AM


GrowlyBear    -- 02-02-2005 @ 11:39 AM
  have to ask, you are using session management.

Post the code please.

~~~~~~~~~~~~~~~~~~~
There is no place like 127.0.0.1


jarottman    -- 02-02-2005 @ 11:50 AM
  ... If I told you what the problem was, you would probaly find me and kick me. God knows I am kicking my self as is....

and yes I was using session management.


CJ    -- 02-02-2005 @ 11:52 AM
  c'mon...share with the class! Smile  



-CJ-
@ #coldfusion/DALNet
http://charlie.griefer.com


GrowlyBear    -- 02-02-2005 @ 12:21 PM
  Well this is what happened to me.
My session were not holding the values.
So I could not log in, but my visitor count was up to 20
considering that this is my test server at home it was obviously count me 20 times.
Solution edit my firewall to allow 3rd party cookies and BAM! I could log in and everything was fine.
Moral of the story, it is not always the session management fault.

~~~~~~~~~~~~~~~~~~~
There is no place like 127.0.0.1


jarottman    -- 02-02-2005 @ 12:46 PM
  ok so I was fighting with my sessions thinking as you did it was my session management. So for about 2 hours straight, I was loosing hte battle. Heck, sessions even placed a terbuct outside my office door. Low and behold, not 2 secs after I made my post, did I find I was missing a _ in my query.

Query looked like this before:
<cfquery name="adminCheck" datasource="#DSN#">
SELECT *
FROM tbl_users
WHERE fld_user_id = '#Session.userid#'
</cfquery>

when it should have looked like this

<cfquery name="adminCheck" datasource="#DSN#">
SELECT *
FROM tbl_users
WHERE fld_user_id = '#Session.user_id#'
</cfquery>

so yes I have been kicking myself all mourning long.


JJfutbol    -- 02-02-2005 @ 9:58 PM
  If it helps any got to remember that coding in a consistent manner is important and very crucial. I've gotten errors like that and I just hate it. Smile  I remember I got an error with Sessions once before but it was because I had 2 application.cfms in 2 different level directories and in the lower one I forgot to take out my cfapplication tag. Feel good I was hitting my head up against the wall for a week!! lol I even told my host if I could cancel my account and get a refund because I couldn't figure out the problem for the life of me and it was simply that. lol

If it helps any I code my variables with capital letters thus I can clearly see the different words that make up a variable. For example in my apps I'll say Session.UserID and I keep that consistent everywhere. Sometimes a variable will be made of two or three words so having underscores just makes it longer then what it needs to be. I find capitalizing to solve my problem. Hope this helps! Ciao

We will come... We will play... We will conquer... We are Laziales!!... Fear us.


EasyCFM.COM ColdFusion Forums : http://archive.easycfm.com/forums
Topic: http://archive.easycfm.com/forums/viewmessages.cfm?Forum=12&Topic=6100