Help

Discussion in 'Getting started' started by smartuk, Mar 4, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi i have moved from fasthosts and i am have problems getting my site to work.

    I have uploaded all the files that i have downloaded frome my fast host server, but i have no website.

    I am new to this an could do with some help
     
  2. The directory files from fast host are htdocs, lod, and private. i have not changed any of these at all, but the site is not working. . . help
     
  3. Ramses

    Ramses Guest

    What's the URL of the site? That way we can test it and tell you what the problem is and how to fix it
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    i assumed your site is located in /htdocs.

    What you need to do is to move all the files in the /htdocs to the root.
     
  5. Still no joy

    Hi and thank you for your help, i have moved the files to the root folder but there is still no website. Do you have any other ideas what i have done wrong.

    Thank you

    Ian
     
  6. At the least the server is successfully attempting to serve the site now. It looks like you now need to edit line 157 of your /includes/config.asp file to point to the correct location of your database file.
     
  7. line 157 says objDataConn.Open strDataSourceName . do you have any idea what is should say.

    Thank you
     
  8. I have all of that problem sorted now. But i have another one !!!! i have an OBDC error on my home page, it reads as follows Microsoft OLE DB Provider for ODBC Drivers error '80004005'

    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    /includes/_content-homepage.asp, line 15

    Any ideas
     
  9. thank you, we have uploaded it via frontpage exstensions, but still the same problem. Any one with any ideas
     
  10. Bruce

    Bruce DiscountASP.NET Staff

    this error means that your code is using a data source that doesn't exist on the server.

    post your code if you can.
     
  11. code 1

    Hi here is my code

    If i pay you, are you able to fix the sit for me?

    'MySQL ODBC Connection String
    'CONST strDataSourceName = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=yourserver;DATABASE=cactushop5;USER=username;PASSWORD=password;OPTION=3;"
    'CONST strDataSourceName = "DRIVER={MySQL};SERVER=yourserver;DATABASE=cactushop5;USER=username;PASSWORD=password;OPTION=3;"

    'MS SQLServer Connection String (for connecting on port 1433 - the standard port for SQL Server)
    'CONST strDataSourceName="Provider=sqloledb;Data Source=yourserver,1433;Network Library=DBMSSOCN;Initial Catalog=cactushop5;User ID=username;Password=password;"
    'CONST strDataSourceName="Provider=sqloledb;Data Source=yourserver,1433;Network Library=DBMSSOCN;Initial Catalog=cactushop5;Trusted_Connection=yes;"

    'MSDE Connection String
    'CONST strDataSourceName = "Provider=SQLOLEDB.1;Initial Catalog=cactushop5_sql;Data Source=sql.yourhost.com;User ID=yourID;Password=Yourpassword;"

    'MS Access OLEDB Connection String
    strPathToDatabase = "private/cactushop5.mdb" 'WE ADVISE TO CHANGE THIS OR TURN OFF READ ACCESS TO THIS FOLDER
    strDatabasePassword = ""
    strDataSourceName = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(strPathToDatabase) & ";Jet OLEDB:Database Password=" & strDatabasePassword
    '-----------------------------------------------

    '-----------------------------------------------
    'MYSQL, SQL SERVER OR ACCESS
    'This sets a few variables based on which
    'database is set to be used. This was in
    'functions.asp until v5.117 when it moved here
    'and also incorporated the cursor type setting.
    '-----------------------------------------------
    Select case strDatabaseType

    Case "access"
    strDeleteStatementSyntax = "DELETE * FROM"
    strDateDelimiter = "#"
    numCursorType = 3

    Case "mssql"
    strDeleteStatementSyntax = "DELETE FROM"
    strDateDelimiter = "'"
    numCursorType = 1

    Case "mysql"
    strDeleteStatementSyntax = "DELETE FROM"
    strDateDelimiter = "'"
    numCursorType = 3

    Case Else
    response.write("Your strDatabaseType setting in the config.asp is not valid.")
    response.end

    End Select
    '-----------------------------------------------

    '-----------------------------------------------
    'CREATE DATABASE CONNECTION
    '-----------------------------------------------
    Set objDataConn = Server.CreateObject("ADODB.Connection")
    objDataConn.Open strDataSourceName
    Set cmdTemp = Server.CreateObject("ADODB.Command")
    Set objRecordSet = Server.CreateObject("ADODB.Recordset")
    Set objRecordSet2 = Server.CreateObject("ADODB.Recordset")
    '-----------------------------------------------

    '-----------------------------------------------
    'SET UP MISCELLANEOUS ARRAYS, VARIABLES, ETC.
    '-----------------------------------------------
    Dim aryCurrencies(6) 'Create array for use later in page when dynamically converting currencies
    Dim aryCurrenciesGateway(6) 'Create array for use later in page when dynamically converting currencies
    Dim strCategoryListHTML
    '-----------------------------------------------

    '-----------------------------------------------
    'CHECK FOR AND CREATE APPLICATION VARIABLES
    'This resetting can be forced by passing 'reset'
    'as a querystring called 'appvar'. The config
    'list file in the back end does this to allow
    'you to force changes to the config settings to
    'take effect.

    'IE seems to have a bug that it sometimes
    'returns the value with the hash anchor. So we
    'check for one and split around it.
    '-----------------------------------------------
    appvar = request.QueryString("appvar")
    if instr(appvar,"#") > 0 Then
    aryAppVar = split(appvar,"#")
    appvar = aryAppVar(0)
    End If

    'Rebuild the variables if either:
    '- the appvar querystring tells us to
    '- The languageid isn't found (a common problem when using the upgrader)
    '- The lastupdated config setting is blank
    '- The lastupdated is different to the one in the DB (only for multiserver)
    blnRebuild = (Application(LICENSENUMBER & "lastupdated") = "") OR (Application(LICENSENUMBER & "defaultlanguageid") & "" = "") OR (appvar="reset")
    if not blnRebuild then
    'Check if lastupdated config setting matches lastupdated record in DB
    strQuery = "SELECT CFG_Value FROM tblCactuShopConfig WHERE CFG_Name = 'lastupdated'"
    blnRebuild = NOT (objDataConn.Execute(strQuery)("CFG_Value") = Application(LICENSENUMBER & "lastupdated"))
    End If

    'Lets rebuild if we need to
    If blnRebuild then
    'Update the lastupdated date with the datetime
    strQuery = "UPDATE tblCactuShopConfig SET CFG_Value = '" & ReverseFormatYear(now) & "' WHERE CFG_Name = 'lastupdated'"
    objDataConn.Execute(strQuery)

    'Rebuild all the config settings
    strQuery = "SELECT CFG_Name, CFG_Value, CFG_DataType FROM tblCactuShopConfig"
    Call ExecuteSQL(strQuery, numCursorType, objRecordSet)
    Do while NOT objRecordSet.EOF
    If objRecordSet("CFG_DataType") = "n" then
    CFG_Value = objRecordSet("CFG_Value") * 1
    Else
    CFG_Value = objRecordSet("CFG_Value")
    End if
    Application(LICENSENUMBER & objRecordSet("CFG_Name")) = CFG_Value
    objRecordSet.MoveNext
    loop
    objRecordSet.Close
    End if
    '-----------------------------------------------

    '-----------------------------------------------
    'COOKIE CHECK
    'Only runs if config setting says so. It checks
    'to see if we're on the failure page (if we are
    'then ignore check, natch.). If cookie check is
    'done and failed (passed in querystring),
    'redirect to failure page. Otherwise check
    'cookie exists. If not, redirect (with page URL)
    'to set it.
    '-----------------------------------------------
    If Application(LICENSENUMBER & "cookiecheck") = "y" then

    'We want to only run the cookie check for browsers
    'such as IE, Netscape (Mozilla) and Opera. Other
    'site visitors may be search engines, and we want
    'to let them index our content without bouncing
    'them out for not supporting cookies. Remember
    'that this only decides whether to test for
    'cookie support - so if the user is running
    'some exotic browser we don't detect, the worst
    'case scenario is we assume they support cookies
    'without testing.

    strHTTPUserAgent = request.ServerVariables("HTTP_USER_AGENT")
    blnBrowser = false

    If Instr(lcase(strHTTPUserAgent), "mozilla") > 0 then blnBrowser = true 'Both IE and Netscape return this
    If Instr(lcase(strHTTPUserAgent), "opera") > 0 then blnBrowser = true 'Opera is cool too
     
  12. If blnBrowser = true then
    If strMenuDisabled = "DISABLED" then
    'Don't run cookie check because this might be secure area
    'If it is, the test cookie might not be read and the user
    'will get bounced out. Once they've got this far, we
    'know they must support cookies anyway.
    Else

    'Get the current page details
    strScriptName = request.ServerVariables("PATH_INFO")
    strQueryString = request.ServerVariables("QUERY_STRING")

    'just get the name of the page from the script name
    intLastSlash = instrrev(strScriptName, "/")
    if intLastSlash > 0 then strScriptName = mid(strScriptName, intLastSlash + 1)

    'Only proceed if it's not the check, fail page or a callback
    'Also fail if the page is a callback (we don't want any cookie checking on these!)
    If not (strScriptName = "cookies_failed.asp") and not (strScriptName = "cookies_check.asp") and not (strScriptName = "error.asp") and not (strScriptName = "closed.asp") and not (instr(strScriptName, "callback") > 0) then

    'Check to see if we've got the cookie
    If not request.cookies(Application(LICENSENUMBER & "cookiename"))("cookiecheck") = "yes" then

    'If we've already tried planting it, then it must have failed
    If request.QueryString("cookiecheck") = "yes" then
    response.Redirect("cookies_failed.asp")
    else
    'Go off and plant the cookie
    response.Redirect("cookies_check.asp?page=" & server.URLEncode(strScriptName) & "&qs=" & Replace(strQueryString, "&", "amp;"))
    end if
    end if

    end if
    End if
    Else
    'It's probably a search engine. Search engines are your friends. Blow them a kiss xxxx.
    End if
    end if
    '-----------------------------------------------


    '-----------------------------------------------
    'ENCRYPTION KEY
    'If you are using our encryption add-on your key
    'goes here
    '-----------------------------------------------
    CONST ENCRYPTIONKEY = "1212121212121212xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    '-----------------------------------------------


    '-----------------------------------------------
    'GET THE CURRENCY CHOICE
    'If a currency is in the querystring, then store
    'that. Otherwise check the cookie. Failing that,
    'use the first value. If it's the back end, use
    'the default currency.
    '-----------------------------------------------
    If InStr(request.ServerVariables("PATH_INFO"), "/_") then
    numCurrencyID = 1
    else
    numCurrencyID = Request.QueryString("numCurrencyID")
    If numCurrencyID = "" then
    numCurrencyID = request.cookies(Application(LICENSENUMBER & "cookiename"))("numCurrencyID")
    End if
    If numCurrencyID = "" then
    numCurrencyID = request.form("numCurrencyID")
    End if
    If numCurrencyID = "" or Not Isnumeric(numCurrencyID) then
    numCurrencyID = 1
    End if
    response.cookies(Application(LICENSENUMBER & "cookiename"))("numCurrencyID") = numCurrencyID
    end if
    '-----------------------------------------------


    '-----------------------------------------------
    'GET THE LANGUAGE CHOICE
    'If a language is in the querystring, then store
    'that. Otherwise check the cookie. Failing that,
    'use the default. If it's the backend, use the
    'login language, or failing that the config setting
    '-----------------------------------------------
    If InStr(request.ServerVariables("PATH_INFO"), "/_") Then
    'In backend, grab it from cookie
    numLanguageID = request.cookies(Application(LICENSENUMBER & "cookiename") & " security")("LOGIN_Language") & ""
    If numLanguageID = "" then numLanguageID = Application(LICENSENUMBER & "defaultlanguageid")
    blnBackEnd = True
    Else
    'Set the language ID
    numLanguageID = Request.QueryString("numLanguageID")
    If numLanguageID = "" then numLanguageID = request.cookies(Application(LICENSENUMBER & "cookiename") & "lang")("numLanguageID")
    If numLanguageID = "" then numLanguageID = request.form("numLanguageID")
    If numLanguageID = "" or Not Isnumeric(numLanguageID) then numLanguageID = Application(LICENSENUMBER & "defaultlanguageid")

    'Store it in cookies
    response.cookies(Application(LICENSENUMBER & "cookiename") & "lang")("numLanguageID") = numLanguageID & ""
    response.cookies(Application(LICENSENUMBER & "cookiename") & "lang").Expires = now + 365
    End If

    strQuery = "SELECT LANG_SkinLocation, LANG_EmailTo, LANG_EmailToContact, LANG_EmailFrom FROM tblCactuShopLanguages WHERE LANG_ID = " & numLanguageID
    Call ExecuteSQL(strQuery, numCursorType, objRecordSet)

    If Not (objRecordSet.BOF And objRecordSet.EOF) Then
    strLanguageSkinLocation = objRecordSet("LANG_SkinLocation")

    'Get the language-specific email settings
    strEmailTo = objRecordSet("LANG_EmailTo")
    strEmailToContact = objRecordSet("LANG_EmailToContact")
    strEmailFrom = objRecordSet("LANG_EmailFrom")
    Else
    numLanguageID = 1
    End If

    objRecordSet.Close
    strLanguageTableName = "tblCactuShopLanguageStrings" & Cstr(numLanguageID)
    '-----------------------------------------------


    '-----------------------------------------------
    'LOAD UP THE PAGE STRINGS
    '-----------------------------------------------
    Dim StringDict
    Set StringDict = Server.CreateObject("Scripting.Dictionary")
    '-----------------------------------------------


    '-----------------------------------------------
    'BASE STRINGS
    'Base page strings for functions.asp, backend
    'menu etc.
    '-----------------------------------------------
    BaseStrings = "18, 242, 243, 244, 255, 256, 257, 258, 259, 260, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 300, 308, 603, 683, 704, 833, 834, 863, 883, 886, 887, 888, 902, 1130, 1201"
    TotalStrings = BaseStrings

    If Not PageStrings = "" Then TotalStrings = TotalStrings & "," & PageStrings
    '-----------------------------------------------


    '-----------------------------------------------
    'BACK END BASE STRINGS
    '-----------------------------------------------
    If blnBackEnd = True Then
    TotalStrings = BaseStrings & ", " & "592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 663, 715, 800, 872, 873, 874, 900, 903, 904, 907, 960, 988, 990, 1004, 1008, 1009, 1066, 1070, 1071, 1072, 1076"
    End If

    If Not PageStrings = "" Then TotalStrings = TotalStrings & ", " & PageStrings

    Call LoadStrings(TotalStrings, strLanguageTableName)
    '-----------------------------------------------

    '-----------------------------------------------
    'SET DEFAULT PAGETITLE (SOME PAGES OVERRULE IT!)
    '-----------------------------------------------
    strPageTitleHTML = GetString("Config_Webshopname")

    %>
     
  13. Bruce

    Bruce DiscountASP.NET Staff

    I think this line is the problem

    strPathToDatabase = "private/cactushop5.mdb" 'WE ADVISE TO CHANGE THIS OR TURN OFF READ ACCESS TO THIS FOLDER

    try change it to

    strPathToDatabase = server.mappath("/private/cactushop5.mdb")
     
  14. Hi Bruce,

    I changed the strPathToDatabase and the site was nno longer there. im stuck, but it says the error is in the includes/_content-homepage.asp, line 15

    the code is as follows


    <!--#include file="../Connections/cartdsn002.asp" -->
    <%
    Dim Recordset1__MMColParam
    Recordset1__MMColParam = "homepage"
    If (Request("MM_EmptyValue") <> "") Then
    Recordset1__MMColParam = Request("MM_EmptyValue")
    End If
    %>
    <%
    Dim Recordset1
    Dim Recordset1_numRows

    Set Recordset1 = Server.CreateObject("ADODB.Recordset")
    Recordset1.ActiveConnection = MM_cartdsn00_STRING
    Recordset1.Source = "SELECT * FROM content WHERE which = '" + Replace(Recordset1__MMColParam, "'", "''") + "'"
    Recordset1.CursorType = 0
    Recordset1.CursorLocation = 2
    Recordset1.LockType = 1
    Recordset1.Open()

    Recordset1_numRows = 0
    %>
    <table width="100%" border="0" cellspacing="0" cellpadding="5">
    <tr>
    <td><%=(Recordset1.Fields.Item("dta").Value)%></td>
    </tr>
    </table>
    <%
    Recordset1.Close()
    Set Recordset1 = Nothing
    %>
     
  15. Hi,
    Try changing Include File to Include Virtual like this:

    <!--#include virtual ="../Connections/cartdsn002.asp"-->

    (For some of the includes you may also want to try Server.Execute)
     
  16. That did not work, could it be the dsn file?

    It reads as follows

    [ODBC]
    DRIVER=SQL Server
    UID=ianmorris
    DATABASE=msdb
    WSID=SMART-SALES
    APP=Microsoft® Windows® Operating System
    SERVER=213.171.193.55
    Description=cactushop5.mdb
     
  17. Bruce

    Bruce DiscountASP.NET Staff

    what is this DSN file?
     
  18. Mark, i am stuck and reall can not get this problem sorted out. I thought it would be a simple process moving from fast hosts to asp.net.

    Please could you have a look at the code for me. Would you like the ftp details.

    Thank you so much
     
  19. ...Got your Email and will look into this soon.
    I'll make a backup before I do anything.
    All the best,
    Mark
     
  20. thank you mark. you would not understand the problems i have been having here.
     
  21. Hi,
    I now can understand why you have been having so many troubles with this. . .
    Front Page extensions are installed on that site.
    Do you need them? Why were they they installed, do you know?
    I tried for hours today to sync with the code and it's like the old Interdev days of "Checked out".
    If you never experienced Interdev you're fortunate. ;-)

    Right now there isn't much I can offer other than tips.
    Expression Web v3 can connect but it's having children trying to get around those FPE files.
    All the best,
    Mark
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page