webForumDet fria alternativet

Någon som vill hjälpa med koden ??

ASP

20 svar · 645 visningar · startad av Annderss

Medlem sedan apr. 200514 inlägg
Medlem sedan apr. 200514 inlägg
#2

strDBType = "mysql"
strConnString = "driver={MySQL ODBC 3.51 Driver};option=4;server=localhost;user=username_se;password=password;DATABASE=databasnamn;" '##MySQL w/ MyODBC v3.51
strConnString = "snitz_forums_2000" ## DSN

och då får jag det felet:

Error Type:
Sun ONE ASP VBScript compilation (0x800A043A)
Error in date literal
config.asp, line 51, column 39

När jag tar bort raden 51 (strConnString = "snitz_forums_2000" ## DSN )

får jag följande:
Error Type:
ADODB.Connection.1 (0x80004005)
SQLState: S1000 Native Error Code: 1045 [TCX][MyODBC]Access denied for user: 'root@localhost' (Using password: YES)
inc_header.asp, line 105

Medlem sedan juni 200032 967 inlägg
#3

Ta bort ## DSN från raden.

Medlem sedan apr. 200514 inlägg
#4

och då

There has been an error !!

The database could not be opened !!
Check your config.asp file and set the
strConnString so it points to the database.
Also check if strDBType is set to the right databasetype.

Code : 80004005

Error Description :
SQLState: IM002 Native Error Code: 0 [DataDirect][ODBC lib] Data source name not found and no default driver specified

Medlem sedan juni 200032 967 inlägg
#5

För det första ska du nog bara ha en rad där du definierar strConnstring. Kör du med dsn, eller dsn-less? Det borde nog vara den översta du ska använda, kan jag tänka mig, så ta bort den undre igen. Kontrollera då att du angett rätt användarnamn och lösenord i din connectionstring.

Medlem sedan apr. 200514 inlägg
#6

Nu ser raden så här ut :

strDBType = "mysql"
strConnString = "driver={MySQL ODBC 3.51 Driver};option=4;server=localhost;user=username_se;password=password;DATABASE=databasnamn;" '

och felet :

Error Type:
ADODB.Connection.1 (0x80004005)
SQLState: S1000 Native Error Code: 1045 [TCX][MyODBC]Access denied for user: 'root@localhost' (Using password: YES)
inc_header.asp, line 105

Medlem sedan juni 200032 967 inlägg
#7

Kontrollera då att du angett rätt användarnamn och lösenord i din connectionstring.

Medlem sedan apr. 200514 inlägg
#8

det är rätt

Medlem sedan apr. 200514 inlägg
#9

och filen inc_header.asp :

set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString

Medlem sedan apr. 200514 inlägg
#10

Sajten ligger hos b-one.se

Medlem sedan apr. 200514 inlägg
#11

Någon ?

Medlem sedan apr. 200514 inlägg
#12

ingen ?

Medlem sedan aug. 20011 087 inlägg
#13

Hmm e inte helt 100 men b-one kör väll chiliasp, tror connectionstringen ser lite annorlunda ut då, typ user heter UID och password heter PWD.

exempel finns i b-ones support.
https://www.b-one.net/static/support-faq.do?category=asp&number=5

Attans nedrans chiliasp *inte gilla alls*

Medlem sedan apr. 200514 inlägg
#14

Är det bara det som är skillnad ??

Medlem sedan apr. 200514 inlägg
#15

The database could not be opened !!
Check your config.asp file and set the
strConnString so it points to the database.
Also check if strDBType is set to the right databasetype.

Code : 80004005

Error Description :
SQLState: S1000 Native Error Code: 1045 [TCX][MyODBC]Access denied for user: 'root@localhost' (Using password: YES)

Medlem sedan apr. 200514 inlägg
#16

Vet någon ??

Medlem sedan aug. 20011 087 inlägg
#17

visa din kod

Medlem sedan maj 20033 218 inlägg
#18

skall du verligen logga in som root?
Kontrollera så att du skickar med korrekt lösen och användarnamn.

"Access denied for user: 'root@localhost' "

Medlem sedan apr. 200514 inlägg
#19

Filen heter config.asp :

<!--#INCLUDE FILE="inc_adovbs.asp"-->
<%
Session.LCID = 1033 '## Do Not Edit
Response.Buffer = true

dim strDBType, strConnString, strTablePrefix, strMemberTablePrefix, strFilterTablePrefix '## Do Not Edit
Dim counter, ConnErrorNumber, ConnErrorDesc, blnSetup '## Do Not Edit

strDBType = "mysql"

strConnString = "driver={MySQL ODBC 3.51 Driver};option=4;server=localhost;user=username;password=password;DATABASE=databasnamn;" '

strTablePrefix = "FORUM_"
strMemberTablePrefix = "FORUM_"
strFilterTablePrefix = "FORUM_" 'used for BADWORDS and NAMEFILTER tables

'#################################################################################
'## If you have deleted the default Admin account, you may need to change the
'## value below. Otherwise, it should be left unchanged. (such as with a new
'## installation)
'#################################################################################

Const intAdminMemberID = 1

'#################################################################################
'## intCookieDuration is the amount of days before the forum cookie expires
'## You can set it to a higher value
'## For example for one year you can set it to 365
'## (default is 30 days)
'#################################################################################

Const intCookieDuration = 30

%>
<!--#INCLUDE FILE="inc_iconfiles.asp"-->
<%
'#################################################################################
'## Do Not Edit Below This Line - It could destroy your forums and lose data
'#################################################################################

Dim mLev, strLoginStatus, MemberID, strArchiveTablePrefix
Dim strVersion, strForumTitle, strCopyright, strTitleImage, strHomeURL
Dim strForumURL, strAuthType, strSetCookieToForum, strEmail, strUniqueEmail
Dim strMailMode, strMailServer, strSender, strDateType, strTimeAdjust
Dim strTimeType, strMoveTopicMode, strMoveNotify, strIPLogging, strPrivateForums
Dim strShowModerators, strAllowForumCode, strIMGInPosts, strAllowHTML, strNoCookies
Dim strHotTopic, intHotTopicNum, strSecureAdmin
Dim strAIM, strICQ, strMSN, strYAHOO
Dim strFullName, strPicture, strSex, strCity, strState
Dim strAge, strAgeDOB, strCountry, strOccupation, strBio
Dim strHobbies, strLNews, strQuote, strMarStatus, strFavLinks
Dim strRecentTopics, strAllowHideEmail, strHomepage, strUseExtendedProfile, strIcons
Dim strGfxButtons, strEditedByDate, strBadWordFilter, strBadWords, strDefaultFontFace
Dim strDefaultFontSize, strHeaderFontSize, strFooterFontSize, strPageBGColor, strDefaultFontColor
Dim strLinkColor, strLinkTextDecoration, strVisitedLinkColor, strVisitedTextDecoration
Dim strActiveLinkColor, strActiveTextDecoration, strHoverFontColor, strHoverTextDecoration
Dim strHeadCellColor, strHeadFontColor, strCategoryCellColor, strCategoryFontColor
Dim strForumFirstCellColor, strForumCellColor, strAltForumCellColor, strForumFontColor
Dim strForumLinkColor, strForumLinkTextDecoration, strForumVisitedLinkColor, strForumVisitedTextDecoration
Dim strForumActiveLinkColor, strForumActiveTextDecoration, strForumHoverFontColor, strForumHoverTextDecoration
Dim strTableBorderColor, strPopUpTableColor, strPopUpBorderColor, strNewFontColor, strHiLiteFontColor, strSearchHiLiteColor
Dim strTopicWidthLeft, strTopicNoWrapLeft, strTopicWidthRight, strTopicNoWrapRight, strShowRank
Dim strRankAdmin, strRankMod, strRankColorAdmin, strRankColorMod
Dim strRankLevel0, strRankLevel1, strRankLevel2, strRankLevel3, strRankLevel4, strRankLevel5
Dim strRankColor0, strRankColor1, strRankColor2, strRankColor3, strRankColor4, strRankColor5
Dim intRankLevel0, intRankLevel1, intRankLevel2, intRankLevel3, intRankLevel4, intRankLevel5
Dim strSignatures, strDSignatures, strShowStatistics, strShowImagePoweredBy, strLogonForMail
Dim strShowPaging, strShowTopicNav, strPageSize, strPageNumberSize, strForumTimeAdjust
Dim strNTGroups, strAutoLogon, strModeration, strSubscription, strArchiveState, strUserNameFilter
Dim strFloodCheck, strFloodCheckTime, strTimeLimit, strEmailVal, strProhibitNewMembers, strRequireReg, strRestrictReg
Dim strGroupCategories, strPageBGImageUrl, strImageUrl, strJumpLastPost, strStickyTopic, strShowSendToFriend
Dim strShowPrinterFriendly, strShowTimer, strTimerPhrase, strShowFormatButtons, strShowSmiliesTable, strShowQuickReply
Dim SubCount, MySubCount

strCookieURL = Left(Request.ServerVariables("Path_Info"), InstrRev(Request.ServerVariables("Path_Info"), "/"))
strUniqueID = "Snitz00"
If Application(strCookieURL & "ConfigLoaded")= "" Or IsNull(Application(strCookieURL & "ConfigLoaded")) Or blnSetup="Y" Then

on error resume next

blnLoadConfig = TRUE

set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Errors.Clear
Err.Clear

my_Conn.Open strConnString
for counter = 0 to my_conn.Errors.Count -1
	ConnErrorNumber = Err.Number
	ConnErrorDesc = my_Conn.Errors(counter).Description
	If ConnErrorNumber \<\> 0 Then
		If blnSetup \<\> "Y" Then
			my_Conn.Errors.Clear
			Err.Clear
			Response.Redirect "setup.asp?RC=1&CC=1&strDBType=" & strDBType & "&EC=" & ConnErrorNumber & "&ED=" & Server.URLEncode(ConnErrorDesc)
		else
			blnLoadConfig = FALSE
		end if
	end if
next

my_Conn.Errors.Clear
Err.Clear 

'## if the configvariables aren't loaded into the Application object
'## or after the admin has changed the configuration
'## the variables get (re)loaded

'## Forum_SQL
strSql = "SELECT \* FROM " & strTablePrefix & "CONFIG_NEW "

set rsConfig = my_Conn.Execute (strSql)

for counter = 0 to my_conn.Errors.Count -1
	ConnErrorNumber = Err.Number
	If ConnErrorNumber \<\> 0 Then
		If blnSetup \<\> "Y" Then
			my_Conn.Errors.Clear
			Err.Clear

			strSql = "SELECT C_STRVERSION, C_STRSENDER "
			strSql = strSql & " FROM " & strTablePrefix & "CONFIG "

			set rsInfo = my_Conn.Execute (StrSql)
			strVersion = rsInfo("C_STRVERSION")
			strSender = rsInfo("C_STRSENDER")

			rsInfo.Close
			set rsInfo = nothing

			if strVersion = "" then
				strSql = "SELECT C_VALUE "
				strSql = strSql & " FROM " & strTablePrefix & "CONFIG_NEW "
				strSql = strSql & " WHERE C_VARIABLE = 'strVersion' "
				set rsInfo = my_Conn.Execute (StrSql)
				strVersion = rsInfo("C_VALUE")
				rsInfo.Close
				set rsInfo = nothing

				strSql = "SELECT C_VALUE "
				strSql = strSql & " FROM " & strTablePrefix & "CONFIG_NEW "
				strSql = strSql & " WHERE C_VARIABLE = 'strSender' "
				set rsInfo = my_Conn.Execute (StrSql)
				strSender = rsInfo("C_VALUE")
				rsInfo.Close
				set rsInfo = nothing
			end if

			my_Conn.Close
			set my_Conn = nothing

			Response.Redirect "setup.asp?RC=2&MAIL=" & Server.UrlEncode(strSender) & "&VER=" & Server.URLEncode(strVersion) & "&strDBType="& strDBType & "&EC=" & ConnErrorNumber
		else
			my_Conn.Errors.Clear
			blnLoadConfig = FALSE
		end if

	end if
next

my_Conn.Errors.Clear

if blnLoadConfig then
	Application.Lock
	do while not rsConfig.EOF
		Application(strCookieURL & Trim(UCase(rsConfig("C_VARIABLE")))) = Trim(rsConfig("C_VALUE"))
		rsConfig.MoveNext
	loop
	Application.UnLock
	rsConfig.close
end if

my_Conn.Close
set my_Conn = nothing

on error goto 0
Application.Lock
Application(strCookieURL & "ConfigLoaded")= "YES"
Application.UnLock

End If

Medlem sedan maj 20033 218 inlägg
#20

hmm du bör väl ändra:

strConnString = "driver={MySQL ODBC 3.51 Driver};option=4;server=localhost;user=username;password=pas
sword;DATABASE=databasnamn;" '

Du bör väl sätta dessa värdena?
username
åassword
databasnamn

260 ms totalt · 4 externa anrop · v20260731065814-full.1dc6f849
123 ms — deklarationer (db)
0 ms — hämta statistik (cache)
135 ms — hämta tråd, inlägg och bilagor (db)
122 ms — ändringar (db)