Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Active users - by design?
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 4

nickw
Junior Member

Ireland
193 Posts

Posted - 27 May 2003 :  04:06:47  Show Profile
http://www.ifsd.ie/inc_func_common.txt

Thanks for this.....


Nick
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 27 May 2003 :  07:57:23  Show Profile  Visit masterao's Homepage
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
Go to Top of Page

nickw
Junior Member

Ireland
193 Posts

Posted - 27 May 2003 :  08:22:24  Show Profile
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
Go to Top of Page

nickw
Junior Member

Ireland
193 Posts

Posted - 27 May 2003 :  08:35:11  Show Profile
OK Jan, that did not seem to resolve it. It seems to still happen. I must be loosing it ;-)

Nick
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 27 May 2003 :  09:29:58  Show Profile  Visit masterao's Homepage
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
Go to Top of Page

nickw
Junior Member

Ireland
193 Posts

Posted - 27 May 2003 :  09:37:31  Show Profile
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
Go to Top of Page

nickw
Junior Member

Ireland
193 Posts

Posted - 27 May 2003 :  09:39:51  Show Profile
OK, here they are...

EDIT: Removed links.....

Cheers,

Nick

Edited by - nickw on 02 June 2003 16:17:22
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 27 May 2003 :  11:16:36  Show Profile  Visit masterao's Homepage
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
Go to Top of Page

nickw
Junior Member

Ireland
193 Posts

Posted - 27 May 2003 :  11:50:24  Show Profile
OK Jan, I have done that.

Should I have done that in the first place?

Nick
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 27 May 2003 :  13:37:32  Show Profile  Visit masterao's Homepage
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
Go to Top of Page

nickw
Junior Member

Ireland
193 Posts

Posted - 27 May 2003 :  14:41:09  Show Profile
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
Go to Top of Page

nickw
Junior Member

Ireland
193 Posts

Posted - 27 May 2003 :  15:14:23  Show Profile
Early tests seem much better... Maybe moving that line did it. More info later....

Nick
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 27 May 2003 :  16:24:36  Show Profile  Visit masterao's Homepage
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
Go to Top of Page

nickw
Junior Member

Ireland
193 Posts

Posted - 28 May 2003 :  14:14:57  Show Profile
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
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 31 May 2003 :  17:40:49  Show Profile  Visit masterao's Homepage
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
Go to Top of Page
Page: of 4 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.39 seconds. Powered By: Snitz Forums 2000 Version 3.4.07