Author |
Topic |
nickw
Junior Member
Ireland
193 Posts |
|
masterao
Senior Member
Sweden
1678 Posts |
Posted - 27 May 2003 : 07:57:23
|
Im not sure if this will fix it, you need to do the following to add one bug-fix to your ActiveUserTracker sub. Add the lines marked red and see if it makes any difference:
'Ls3k- Second order of business, lets update those already-active users
if strNewUser = 0 then 'If already-active
strSql = "UPDATE " & strTablePrefix & "ACTIVE_USERS SET " & _
"AU_LASTACTIVETIME='" & Chkstring(strCurrentTime, "SQLString") & "'" & _
", AU_LASTPAGE='" & Chkstring(strScriptName, "SQLString") & "'" & _
", AU_QUERYSTRING='" & Chkstring(strQueryString, "SQLString") & "' "
if MemberID=-1 then 'If guest, update based on IP
strSql = strSql & "WHERE AU_IP = '" & Chkstring(strUserIP, "SQLString") & "' " & _
"AND MEMBER_ID = " & MemberID
else 'Update members based on MemberID
strSql = strSql & "WHERE MEMBER_ID = " & MemberID
end if
my_conn.execute (strSql)
else 'Is a new user, make new record
If strLoginStatus = 0 then
strSql = "INSERT INTO " & strTablePrefix & "ACTIVE_USERS (" & _
"MEMBER_ID, AU_IP, AU_LOGINTIME, AU_LASTACTIVETIME, " & _
"AU_LASTPAGE, AU_QUERYSTRING, AU_USER_AGENT) VALUES(" & _
MemberID & ", " & _
"'" & Chkstring(strUserIP, "SQLString") & "', " & _
"'" & Chkstring(strCurrentTime, "SQLString") & "', " & _
"'" & Chkstring(strCurrentTime, "SQLString") & "', " & _
"'" & Chkstring(strScriptName, "SQLString") & "', " & _
"'" & Chkstring(strQueryString, "SQLString") & "', " & _
"'" & Chkstring(strUserAgent, "SQLString") & "')"
my_conn.execute (strSql)
end if
end if
|
Jan =========== FR Portal Forums | Active Users 4.0.20 Mod |
|
|
nickw
Junior Member
Ireland
193 Posts |
Posted - 27 May 2003 : 08:22:24
|
Thanks Jan,
I have added that now... what does this do exactly? Was that a published bug fix that I missed?
Thanks in advance.
|
Nick |
|
|
nickw
Junior Member
Ireland
193 Posts |
Posted - 27 May 2003 : 08:35:11
|
OK Jan, that did not seem to resolve it. It seems to still happen. I must be loosing it ;-) |
Nick |
|
|
masterao
Senior Member
Sweden
1678 Posts |
Posted - 27 May 2003 : 09:29:58
|
That addition is a bug-fix, which takes care of ghost-guests (if you logged in, you weren't removed as a guest and showed up both as a guest and as a member).
Have you checked the AU code that you added to login.asp? I suspect that the problem is connected to that page. Also, which database and connection string (remove any sensible information from the conn-string before posting it here) do you use?
|
Jan =========== FR Portal Forums | Active Users 4.0.20 Mod |
|
|
nickw
Junior Member
Ireland
193 Posts |
Posted - 27 May 2003 : 09:37:31
|
I do not remember any changes to the login.asp script...??? It has been a while since I modified it.
I will get texts of both the files and post them here.
I will remove any "specifics" from the config.asp |
Nick |
|
|
nickw
Junior Member
Ireland
193 Posts |
Posted - 27 May 2003 : 09:39:51
|
OK, here they are...
EDIT: Removed links.....
Cheers,
|
Nick |
Edited by - nickw on 02 June 2003 16:17:22 |
|
|
masterao
Senior Member
Sweden
1678 Posts |
Posted - 27 May 2003 : 11:16:36
|
In login.asp, look for this block of code:
if RequestMethod = "POST" Then
strEncodedPassword = sha256("" & fPassword)
select case chkUser(fName, strEncodedPassword,-1)
case 1, 2, 3, 4
AUHandleLoging()
Call DoCookies(Request.Form("SavePassword"))
strLoginStatus = 1
AUHandleLoging()
case else
strLoginStatus = 0
end select
Move the code marked red to the place where it is marked green. Im not sure if there are any problems with having it in the place you put it, but it could have some implications. |
Jan =========== FR Portal Forums | Active Users 4.0.20 Mod |
|
|
nickw
Junior Member
Ireland
193 Posts |
Posted - 27 May 2003 : 11:50:24
|
OK Jan, I have done that.
Should I have done that in the first place?
|
Nick |
|
|
masterao
Senior Member
Sweden
1678 Posts |
Posted - 27 May 2003 : 13:37:32
|
Im not sure if that will fix your problem, but it is one thing less to do if we have to continue troubleshooting.
Have you noticed any difference? |
Jan =========== FR Portal Forums | Active Users 4.0.20 Mod |
|
|
nickw
Junior Member
Ireland
193 Posts |
Posted - 27 May 2003 : 14:41:09
|
Not yet... But, not many active users yet.
It is not 19:30 here, so the site gets busy for the next couple of hours. I'll let you know.
Thanks,
|
Nick |
|
|
nickw
Junior Member
Ireland
193 Posts |
Posted - 27 May 2003 : 15:14:23
|
Early tests seem much better... Maybe moving that line did it. More info later....
|
Nick |
|
|
masterao
Senior Member
Sweden
1678 Posts |
Posted - 27 May 2003 : 16:24:36
|
That sounds hopefull. I'll await more info from you when you have had the opportunity to test it to the fullest. |
Jan =========== FR Portal Forums | Active Users 4.0.20 Mod |
|
|
nickw
Junior Member
Ireland
193 Posts |
Posted - 28 May 2003 : 14:14:57
|
Oh dear... no, same issue...
What happens is exactly this...
I am logged on, looking at the active users... A new user logs on, and the counters go to 0, and it only leaves me and the new user in the list. All other users are gone.
Help!
|
Nick |
|
|
masterao
Senior Member
Sweden
1678 Posts |
Posted - 31 May 2003 : 17:40:49
|
Strange...
You are sure they hadn't reached the timeout value? Was this the first time this happened after you made the change in login.asp? |
Jan =========== FR Portal Forums | Active Users 4.0.20 Mod |
|
|
Topic |
|