SELECT userID, userPassword, userName, userRole FROM kusers WHERE userName = SELECT userID, firstName, lastName FROM kuserInfo WHERE userID = #rsvalidateUser.userID# [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => risu81 [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> cflogin problems - Coldfusion - Advanced Techniques

cflogin problems - Coldfusion - Advanced Techniques

I am having problems with a site of mine setting session variables. My site was working fine for over 7 months until it started acting odd a few weeks ago. I can log on to the site and access any page from almost every computer I use, but I usually can't access the site from the two computers at my home and one or two at work. On the machines that fail to work, none of the session variables are being set. I've tried it out on two seperate sites hosted by different companies and I get the same problem. ...

  1. #1

    Default cflogin problems

    I am having problems with a site of mine setting session variables. My site was
    working fine for over 7 months until it started acting odd a few weeks ago. I
    can log on to the site and access any page from almost every computer I use,
    but I usually can't access the site from the two computers at my home and one
    or two at work. On the machines that fail to work, none of the session
    variables are being set. I've tried it out on two seperate sites hosted by
    different companies and I get the same problem.

    I am behind a firewall (ZoneAlarm), but I've turned it off and turned my
    anti-virus software off, and I get the same error. I've also set IE, Firefox,
    and Opera to accept all cookies, but that doesn't work.

    Using my testing server I have noticed that not logging out of the site or
    closing the browser window leads to the problem on any subsequent logins to the
    site. Restarting the CF server clears up the problem and it works fine until
    the browser is closed without logging out..

    I've tested the code below and nothing inside the cflogin tags works. I've
    left out some other parts of the code that work, so the cfif statements might
    not match up.

    Any ideas on this? - Rod

    <cfapplication name=""
    clientmanagement="yes"
    sessionmanagement="yes"
    setclientcookies="yes"
    setdomaincookies="yes"
    sessiontimeout="#CreateTimeSpan(0,0,30,0)#"
    applicationtimeout="#CreateTimeSpan(0,0,30,0)#"
    clientstorage="Cookie"
    loginstorage="Session">

    <cflogin idletimeout="1800" applicationtoken="X"
    cookiedomain=".learningblueprint.org">
    <!--- If the login structure does not exist, send the user to the login page
    --->
    <cfif (not IsDefined("cflogin")) AND (thispage eq "registration.cfm")>
    <cfinclude template="registration.cfm">
    <cfabort>
    <cfelseif not IsDefined("cflogin")>
    <cfinclude template="login.cfm">
    <cfabort>

    <!--- Validate user and assign roles. --->
    <cfelse>

    <!--- If username or password are blank, send the user back to the login form
    --->
    <cfif cflogin.Name is "" or cflogin.Password is "">
    <cfset URL.message = "You must enter text in both the Username and Password
    fields">
    <cfinclude template="login.cfm">
    <cfabort>

    <!--- Perform user validation --->
    <cfelse>
    <cfquery name="rsvalidateUser" datasource="#application.DSN#">
    SELECT userID, userPassword, userName, userRole
    FROM kusers
    WHERE userName = <cfqueryparam value="#cflogin.Name#">
    </cfquery>


    <!--- If the username and password match, user is authenticated and roles are
    assigned --->
    <cfif (rsvalidateUser.RecordCount neq 0) AND (rsvalidateUser.userPassword eq
    '#cflogin.Password#')>
    <cfquery name="rsmemberName" datasource="#application.DSN#">
    SELECT userID, firstName, lastName
    FROM kuserInfo
    WHERE userID = #rsvalidateUser.userID#
    </cfquery>
    <cfloginuser name="#cflogin.Name#" password="#cflogin.Password#"
    roles="#rsvalidateUser.userRole#">
    <cflock name="sLogin_Lock" timeout="20" type="exclusive">
    <cfset session.userName = rsvalidateUser.userName>
    <cfset session.userID = rsvalidateUser.userID>
    <cfset session.role = rsvalidateUser.userRole>
    <cfset session.firstName = rsmemberName.firstName>
    <cfset session.lastName = rsmemberName.lastName>
    </cflock>
    </cfif>
    </cfif>
    </cfif>
    </cflogin>

    risu81 Guest

  2. #2

    Default Re: cflogin problems

    Does the problem persist when you use this instead
    <cflogin idletimeout="1800" applicationtoken="X"> ?
    If so, it might be that the "problem" machines are not in your domain.



    BKBK Guest

  3. #3

    Default Re: cflogin problems

    Originally posted by: BKBK
    Does the problem persist when you use this instead
    <cflogin idletimeout="1800" applicationtoken="X"> ?
    If so, it might be that the "problem" machines are not in your domain.


    Thanks for the suggestion. Yes, I still get the error. I should also mention
    that I am using CF MX 7 with the latest updates and hotfixes installed. The
    code I'm using is pretty much item for item out of Programing ColdFusion MX 2nd
    Edition. I've looked for changes between MX 6.1 and MX 7 in this area, but
    nothing has popped out at me. Thanks again for the suggestion. - Rod

    risu81 Guest

Similar Threads

  1. CFLOGIN in IE
    By tempestweb in forum Macromedia ColdFusion
    Replies: 9
    Last Post: August 31st, 01:38 PM
  2. cflogin
    By Mattastic in forum Macromedia ColdFusion
    Replies: 5
    Last Post: August 11th, 10:09 AM
  3. <cflogin> and <cfloginuser> problems
    By mikkime23 in forum Coldfusion - Getting Started
    Replies: 4
    Last Post: April 20th, 06:17 AM
  4. cflogin HELP
    By nckgb in forum Coldfusion - Getting Started
    Replies: 0
    Last Post: March 15th, 03:00 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