Professional Web Applications Themes

Help with Session variable expiration - Macromedia ColdFusion

Hello Everyone, I have noticed that Session Variables are only retained if I am currently logged in to my CF admin. Is this the way it should be? Even after I log in, my CF admin times out after awhile, and then anyone using my server starts getting errors of session variables disappearing. Can someone please assist me? Thank you in advance. ---Keith...

  1. #1

    Default Help with Session variable expiration

    Hello Everyone,
    I have noticed that Session Variables are only retained if I am
    currently logged in to my CF admin. Is this the way it should be? Even after
    I log in, my CF admin times out after awhile, and then anyone using my server
    starts getting errors of session variables disappearing. Can someone please
    assist me? Thank you in advance.

    ---Keith

    Skotopia Guest

  2. #2

    Default Re: Help with Session variable expiration

    Anyone have any ideas? I'm still stumped
    Skotopia Guest

  3. #3

    Default Re: Help with Session variable expiration

    Check a couple things. In CF admin check to see what the default timeout is for
    them. Second in your application.cfm i suggest adding the following...
    <cfapplication sessionmanagement="yes" clientmanagement="yes"
    sessiontimeout="25">

    and also i have noticed that high quality firewalls can make havoc with
    session vars, so start passing session info via links by using something like...

    <cfset accountmanage123 = "#URLSessionFormat("Members/U_manageselves.cfm")#">
    <a href="#Accountmanage123#">Account Info</a>

    Try that stuff and see how it goes. But yeah... firewalls bad for session
    vars, expecially zone alarm, thats something im constantly fighting with. So if
    that eve has a possibility of being an issue check it out.

    kenji776 Guest

  4. #4

    Default Re: Help with Session variable expiration

    In my CF admin the session timeout is set to the default of 20 minutes (but
    that refers to the users session variables, Not how long I stayed loggined in
    to the cf admin, correct? If so..that shouldn't be the issue).

    In my Application.cfm I had:

    <cfapplication name="AnimaSystem" clientmanagement="no"
    sessionmanagement="yes" setclientcookies="no" setdomaincookies="no">


    perhaps this is the problem... i should set clientmanagement to yes?
    Thanks for responding.... btw, is your email name from Kenshin, or is that a
    different Aoshi?

    Skotopia Guest

  5. #5

    Default Re: Help with Session variable expiration

    This is really holding me up....any thoughts!?
    Skotopia Guest

  6. #6

    Default Re: Help with Session variable expiration

    ::bump::
    Skotopia Guest

  7. #7

    Default Re: Help with Session variable expiration

    Hmm... i still can't get it.. In my admin, session and application variables
    are enabled... and my Application.cfm doent is:

    <cfapplication name="AnimaSystem" sessionmanagement="yes"
    clientmanagement="yes" setclientcookies="no" setdomaincookies="no"
    sessiontimeout="25">
    <cflock scope="SESSION" type="EXCLUSIVE" timeout="3">
    <cfif NOT IsDefined("session.loggedIn")>
    <cfset session.loggedIn = false>
    </cfif>
    <cfif NOT IsDefined("session.userName")>
    <cfset session.userName = "">
    </cfif>
    <cfif NOT IsDefined("session.userID")>
    <cfset session.userID= "">
    </cfif>
    </cflock>



    Can anyone see why the session variables are dissapearing for people loggin in
    from outside (for me its fine)?

    Skotopia Guest

  8. #8

    Default Re: Help with Session variable expiration

    Hmm... i still can't get it.. In my admin, session and application variables
    are enabled... and my Application.cfm doent is:

    <cfapplication name="MyAPP" sessionmanagement="yes" clientmanagement="yes"
    setclientcookies="no" setdomaincookies="no" sessiontimeout="25">
    <cflock scope="SESSION" type="EXCLUSIVE" timeout="3">
    <cfif NOT IsDefined("session.loggedIn")>
    <cfset session.loggedIn = false>
    </cfif>
    <cfif NOT IsDefined("session.userName")>
    <cfset session.userName = "">
    </cfif>
    <cfif NOT IsDefined("session.userID")>
    <cfset session.userID= "">
    </cfif>
    </cflock>



    Can anyone see why the session variables are dissapearing for people loggin in
    from outside (for me its fine)?

    Skotopia Guest

  9. #9

    Default Re: Help with Session variable expiration

    Your session variables seem to be OK. What are the 'application' settings
    in CF Admin? And what do you mean when you say your "CF Admin times out"?
    What happens then?
    BKBK Guest

  10. #10

    Default Re: Help with Session variable expiration

    To answer your second question first; say that I have turned my computer off,
    and the next day I turn it on for the first time and have not yet logged into
    to my CF admin: at this point anyone using my Application will have their
    session variables dissapear and get errors, including myself. Even after I
    have logged into my CF admin, after a while of nonactivity, it will revert back
    to this state (i would think you'd want a server like this to Never ever time
    out as long as the computer is on, thats why i am puzzled).

    Now, for your first question, in my admin, under the "Memory Variables"
    section I have:

    J2EE session variables NOT enabled
    session variables enabled
    application variables enabled

    Max timeout = 2 days for application variables
    Max timeout = 2 days for session variables

    Default timeout = 2 days for application variables
    Default timeout = 20 minutes for sessionv variables


    Is this the information you were asking for? I hope this helps to narrow it
    down. Thank you all for your help.


    ---Keith



    Skotopia Guest

  11. #11

    Default Re: Help with Session variable expiration

    Still can't figure this out. ::pulls hair out::
    Skotopia Guest

  12. #12

    Default Re: Help with Session variable expiration

    Check this page out which has info about the cfapplication tag. You need to use
    the CreateTimeSpan function to set the sessiontimeout--not just pass a number.
    Make sure the max is high enough in CF Admin to accomodate the span you would
    like to use in a specific application.


    http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/
    wwhelp.htm?context=ColdFusion_Doentation&file=p art_cfm.htm

    truewrestler Guest

  13. #13

    Default Re: Help with Session variable expiration

    Thanks, I will certainly do that. But by the way; why does it work for me on the local box then? I guess the timeout doesn't apply to me for some reason?
    Skotopia Guest

Similar Threads

  1. #39634 [NEW]: session variable and normal variable
    By erhanbaris at gmail dot com in forum PHP Bugs
    Replies: 3
    Last Post: November 27th, 10:09 AM
  2. Session expiration and authentication
    By Marcio Kleemann in forum ASP.NET Security
    Replies: 2
    Last Post: May 24th, 10:57 PM
  3. Replies: 1
    Last Post: July 17th, 01:35 AM
  4. [SESSION] Session variable deleted prior to command?
    By Ivo Fokkema in forum PHP Development
    Replies: 0
    Last Post: July 16th, 12:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139