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: General / Classic ASP versions(v3.4.XX)
 Microsoft JET Database Engine error '80040e57'
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 3

gpctexas
Junior Member

320 Posts

Posted - 14 June 2007 :  20:14:36  Show Profile  Visit gpctexas's Homepage
This looks like it will fix the proxy issue with ipgate as well. Testing it with mod now. =)

ipgate 2.4.4 RC3
http://www.gpctexas.net/ipgate_v244.zip
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 15 June 2007 :  04:00:42  Show Profile
Did it work?


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

gpctexas
Junior Member

320 Posts

Posted - 15 June 2007 :  14:22:41  Show Profile  Visit gpctexas's Homepage
So far it does.

ipgate 2.4.4 RC3
http://www.gpctexas.net/ipgate_v244.zip
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 18 June 2007 :  04:28:18  Show Profile
Good stuff


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Image
Average Member

Canada
574 Posts

Posted - 17 July 2007 :  20:13:25  Show Profile  Visit Image's Homepage  Send Image an ICQ Message
quote:
Originally posted by Shaggy

An additional change needs to made to the two files to handle IP addresses that may include the port number in them (e.g., 123.456.789.012:345) and I've also made a few minor tweaks to the previous chnages (replacing mid with left).

To implement these changes, find the UpdateLastHereDate function on line 575 of inc_func_common.asp and replace the entire function with the following:
function UpdateLastHereDate(fTime,UserName)
	UserIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
	If UserIPAddress = "" or Left(UserIPAddress, 7) = "unknown" Then
		UserIPAddress = Request.ServerVariables("REMOTE_ADDR")
	ElseIf InStr(UserIPAddress, ",") > 0 Then
		UserIPAddress = Left(UserIPAddress, InStr(UserIPAddress, ",")-1)
	ElseIf InStr(UserIPAddress, ";") > 0 Then
		UserIPAddress = Left(UserIPAddress, InStr(UserIPAddress, ";")-1)
	End If
	If InStr(UserIPAddress, ":") > 0 then
		UserIPAddress = Left(UserIPAddress, InStr(UserIPAddress, ":")-1)
	End If
	'## Forum_SQL - Do DB Update
	strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
	strSql = strSql & " SET M_LASTHEREDATE = '" & fTime & "'"
	strSql = strSql & ",    M_LAST_IP = '" & UserIPAddress & "'"
	strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(UserName, "SQLString") & "' "
	my_conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end function
Then find the following on lines 807 and 991 of post_info.asp:
UserIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if UserIPAddress = "" then
	UserIPAddress = Request.ServerVariables("REMOTE_ADDR")
end if
And replace it with the following:
UserIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if UserIPAddress = "" or Left(UserIPAddress, 7) = "unknown" then
	UserIPAddress = Request.ServerVariables("REMOTE_ADDR")
elseif InStr(UserIPAddress, ",") > 0 then
	UserIPAddress = Left(UserIPAddress, InStr(UserIPAddress, ",")-1)
elseif InStr(UserIPAddress, ";") > 0 then
	UserIPAddress= Left(UserIPAddress, InStr(UserIPAddress, ";")-1)
end if
if InStr(UserIPAddress, ":") > 0 then
	UserIPAddress = Left(UserIPAddress, InStr(UserIPAddress, ":")-1)
end if



Shaggy, There is no modification to make in register.asp ?
line 409
			UserIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
			if UserIPAddress = "" then
				UserIPAddress = Request.ServerVariables("REMOTE_ADDR")
			end if
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 18 July 2007 :  04:41:42  Show Profile
Yup, don't know how I missed that one; it needs to be replaced with the same code as in post_info.asp - I've updated my post above to include it.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous 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.35 seconds. Powered By: Snitz Forums 2000 Version 3.4.07