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)
 ODBC Drivers error '80004005'
 New Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 13 June 2013 :  18:27:48  Show Profile
Post a link to your "inc_ipgate.asp" in .txt format, Webbo. The versions I have don't connect to a database on line 50.

MaGraham - found a few unclosed handles in the "includes" to "default.asp" and fixed them. Got right on to your forum afterward.

Edited by - Carefree on 13 June 2013 18:29:32
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 14 June 2013 :  02:51:49  Show Profile
quote:
Originally posted by Carefree

MaGraham - found a few unclosed handles in the "includes" to "default.asp" and fixed them. Got right on to your forum afterward.


Oh, wonderful!

THANK YOU! THANK YOU! THANK YOU!

"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 14 June 2013 :  03:36:21  Show Profile
You're welcome. I'm sure there are more elsewhere in the code, but haven't taken the time to go through all of it.
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 15 June 2013 :  03:09:03  Show Profile  Visit Webbo's Homepage
Here you are Carefree: Clicky Linky

Line 50 is highlighted below:

if strIPGateBan = 1 then
'get db records
Set rs1 = Server.CreateObject("ADODB.Recordset")
StrSql = "SELECT * FROM " & strTablePrefix & "IPLIST"
(Line 50) rs1.Open StrSql, strConnString

do until (rs1.eof)


Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 15 June 2013 :  12:14:40  Show Profile
Here you go, Webbo. I took the liberty of changing it a bit, hope it helps.

"inc_ipgate.asp"

<%
'#################################################################################
'## NET IPGATE v2.2.8 Orig Idea by alex042@aol.com(c)Aug 2002,
'## rewritten by www.gpctexas.net Patrick@gpctexas.net March 31, 2004
'#################################################################################
cookiename="IPGate" 'must change for each forum you host on the same domain!
REDIRECT_BAN="ipgate_banned.asp"
REDIRECT_LCK="ipgate_lockdown.asp"
REDIRECT_NOA="ipgate_noaccess.asp"
If (Request.ServerVariables("HTTP_CLIENT_IP") <> "") and (lcase(Request.ServerVariables("HTTP_CLIENT_IP")) <> "unknown") Then
	userip=Request.ServerVariables("HTTP_CLIENT_IP")
Else
	If (Request.ServerVariables("HTTP_X_FORWARDED_FOR") <> "") and (lcase(Request.ServerVariables("HTTP_X_FORWARDED_FOR")) <> "unknown") Then
		userip=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
	Else
		If (Request.ServerVariables("REMOTE_ADDR") <> "") and (lcase(Request.ServerVariables("REMOTE_ADDR")) <> "unknown")  Then
			userip=Request.ServerVariables("REMOTE_ADDR")
		Else
			userip="999.999.999.999"
		End If
	End If
End If
pagereq=Request.ServerVariables("Path_Info")
PathLen = InStrRev(pagereq,"/",-1)
pagreq = lcase(Right(pagereq,(len(pagereq)-PathLen)))
userhost=request.servervariables("REMOTE_HOST")
userdate=DateToStr(strForumTimeAdjust)
pageqryd=Request.ServerVariables("QUERY_STRING")
pagereqtemp=pagreq & "?" & pageqryd
getthecookie=Request.Cookies(trim(cookiename))
notindb=1
FoundIP=0
FoundName=0
pagename=pagreq
If pageqryd <> "" and Len(pagereqtemp) <= 245 Then
	pagreq=pagereqtemp
End If
If strIPGateBan = 1 Then
	StrSql = "SELECT * FROM " & strTablePrefix & "IPLIST"
	Set rs1=my_Conn.Execute(StrSql)
	If not rs1.EOF Then
		Do until rs1.EOF
			dbrecord = rs1("IPLIST_STARTIP") & "."
			dbrecordarr = split(dbrecord,".")
			userip = Trim(ChkString(userip,"SQLString"))
			useriparr = userip & "."
			useriparr = split(userip,".")
			If (rs1("IPLIST_STARTIP") = userip) Then
				FoundIP = 1
			End If
			If FoundIP <> 1 and (dbrecordarr(3) = "")  and ((dbrecordarr(0) =  useriparr(0)) and (dbrecordarr(1) =  useriparr(1)) and (dbrecordarr(2) =  useriparr(2))) Then
				FoundIP = 1
			End If
			If FoundIP <> 1 and (dbrecordarr(2) = "") and ((dbrecordarr(0) =  useriparr(0)) and (dbrecordarr(1) =  useriparr(1))) Then
				FoundIP = 1
			End If
			If lcase(rs1("IPLIST_MEMBERID")) = lcase(strDBNTUsername) Then
				FoundName = 1
			End If
			If ((FoundName = 1) or (FoundIP = 1)) and rs1("IPLIST_STATUS") = 3 Then
				Call writethecookie ("Expired", DateAdd("d",-14,Date))
			End If
			If (FoundName = 1 or FoundIP = 1) and (rs1("IPLIST_STATUS") <> 3) and ((userdate >= rs1("IPLIST_STARTDATE")) and (userdate <= rs1("IPLIST_ENDDATE"))) Then
				If rs1("IPLIST_STATUS") = 0 and mLev < 4 Then
					If strIPGateCok = 1 Then
						Call writethecookie ("Banned", ChkDate(rs1("IPLIST_ENDDATE"), " " ,true))
					End If
					If strIPGatetyp = 0 Then
						If strIPGatelog = 1 Then
							notindb=0
							Call loguser()
						End If
					End If
					Call banned()
				Else
					If rs1("IPLIST_STATUS") = 1 Then
						If strIPGateCok = 1 Then
							Call writethecookie ("Watched", ChkDate(rs1("IPLIST_ENDDATE"), " " ,true))
						End If
						If strIPGatetyp = 0 Then
							If strIPGatelog = 1 Then
								notindb=0
								Call loguser()
							End If
						End If
						Call warnuser()
					Else
						If rs1("IPLIST_STATUS") = 2 and mLev < 4 Then
							PageSql = "SELECT * FROM " & strTablePrefix & "PageKeys"
							Set rs3=my_Conn.Execute(PageSql)
							If not rs3.EOF Then
								rs3.MoveFirst
								Do until rs3.EOF
									If lcase(rs3("PAGEKEYS_PAGEKEY")) = lcase(pagename) Then
										Call writethecookie ("Blocked", ChkDate(rs1("IPLIST_ENDDATE"), " " ,true))
										Call noaccess()
									End If
									rs3.MoveNext
								Loop
								rs3.Close
							End If
							Set rs3=Nothing
							If strIPGatetyp = 0 Then
								If strIPGatelog = 1 Then
									notindb=0
									Call loguser()
								End If
							End If
						End If
					End If
				End If
			End If
			rs1.MoveNext
		Loop
		rs1.Close
	End If
	Set rs1=Nothing
	If strIPGateBan = 1 Then
		If notindb=1 Then
			If strIPGatecok = 1 Then
				If getthecookie = "Banned" and mLev < 4 Then
					If strIPGatetyp = 0 Then
						If strIPGatelog = 1 Then
							Call loguser()
						End If
					End If
					Call banned()
				Else
					If getthecookie = "Watched" Then
						If strIPGatetyp = 0 Then
							If strIPGatelog = 1 Then
								Call loguser()
							End If
						End If
						Call warnuser()
					Else
						If getthecookie = "Blocked" and mLev < 4  Then
							PageSql = "SELECT * FROM " & strTablePrefix & "PageKeys"
							Set rs3=my_Conn.Execute(PageSql)
							If not rs3.EOF Then
								rs3.MoveFirst
								Do until (rs3.EOF)
									If lcase(rs3("PAGEKEYS_PAGEKEY")) = lcase(pagename) Then
										Call noaccess()
									End If
									rs3.MoveNext
								Loop
								rs3.Close
							End If
							Set rs3=Nothing
							If strIPGatetyp = 0 Then
								If strIPGatelog = 1 Then
									Call loguser()
								End If
							End If
						End If
					End If
				End If
			End If
		End If
	End If
End If
If StrIPGateTyp = 1 and strIPGateBan = 1 Then
	Call loguser()
End If
If strIPGateLck = 1 and mLev < 4 and strIPGateBan = 1 Then
	Call lockdown()
End If

Sub loguser()
	StrSql = "INSERT into " & strTablePrefix & "IPLOG (IPLOG_MEMBERID, IPLOG_IP, IPLOG_PATHINFO, IPLOG_DATE) "
	StrSql = StrSql & "values ('" & strDBNTUserName & "','" & userip & "','" & pagreq & "','" & userdate & "')"
	my_Conn.Execute(strSql)
End Sub

Sub writethecookie (cookietype, cookiedate)
	If strIPGateCok = 1  Then
		Response.Cookies(trim(cookiename))=cookietype
		Response.Cookies(trim(cookiename)).Expires = cookiedate
	End If
End Sub

Sub banned()
	Select Case StrIPGateMet
		Case 0
			Response.Write "<br><BR><BR><BR><p align=center><b>" & StrIPGateMsg & "</b></p><br><BR><BR><BR>"
			%><!--#INCLUDE file="inc_footer.asp"--><%
			Response.End
	Case 1
		Response.Redirect REDIRECT_BAN
	End Select
End Sub

Sub lockdown()
	Select Case StrIPGateMet
		Case 0
			Response.Write "<br><BR><BR><BR><p align=center><b>" & StrIPGateLkMsg & "</b></p><br><BR><BR><BR>"
			WriteFooter
			Response.End
		Case 1
			Response.Redirect REDIRECT_LCK
	End Select
End Sub

Sub noaccess()
	Select Case StrIPGateMet
		Case 0
			Response.Write "<br><BR><BR><BR><p align=center><b>" & strIPGateNoAcMsg & "</b></p><br><BR><BR><BR>"
			WriteFooter
			Response.End
		Case 1
			Response.Redirect REDIRECT_NOA
	End Select
End Sub

Sub warnuser()
	Response.Write "<br><center><b>Message:</b> " & StrIPGateWarnMsg & "</center>"
End Sub
%>
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 15 June 2013 :  19:43:54  Show Profile

I'm receiving the error message again. Arrgh!

It's on my default.asp.


Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[MySQL][ODBC 5.1 Driver]Too many connections

/fp/inc_header.asp, line 112


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 15 June 2013 :  19:48:42  Show Profile
quote:
Originally posted by Webbo



MaGraham, have you got the IPGate mod installed?


No, I used the mod that allows me to ask an anti-spam question, Webbo.


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 15 June 2013 :  20:22:13  Show Profile
quote:
Originally posted by MaGraham


[b][size=3]I'm receiving the error message again. Arrgh!

It's on my default.asp.


The error isn't in "default.asp", it's in some other file you were using prior to encountering the error. If you can remember what areas you were in, that will help narrow it down.
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 16 June 2013 :  02:32:40  Show Profile

I was viewing a topic, Carefree.


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 16 June 2013 :  17:05:42  Show Profile  Visit Webbo's Homepage
Works so far with no problems Carefree - thanks
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 16 June 2013 :  21:01:05  Show Profile
Good enough, Webbo.

Ma, I'll try and get back to you later today.
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 21 September 2013 :  14:25:45  Show Profile

Carefree, I was here "members.asp?method=lastheredatedesc" and received the following error message:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[MySQL][ODBC 5.1 Driver]Too many connections

/fp/inc_locale.asp, line 34


Do you feel up to looking at this problem again now?



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 21 September 2013 :  17:38:07  Show Profile
Zip your asp files (except config.asp) and Email them to me. I'll fix it.
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 21 September 2013 :  19:21:37  Show Profile

Just now emailed them to you, Carefree.

THANK YOU!!



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 29 September 2013 :  12:06:52  Show Profile

Have you felt up to looking at my files, Carefree?

I just now received another "Too many connections" error message and the new site isn't even open yet! Arrgh!!

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[MySQL][ODBC 5.1 Driver]Too many connections

/fp/inc_locale.asp, line 34

"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.37 seconds. Powered By: Snitz Forums 2000 Version 3.4.07