We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4310
    • 2,310 Posts
    I recently had this issue with a site.
    I had to change a small bit of code somewhere, I’ll look it up and post shortly.
      • 13623
      • 1 Posts
      I am having this same problem. I am wondering if the fix is available somewhere.
        • 7231
        • 4,205 Posts

        line 19 of connection.databasetest.php this line won’t work change this:
            if (!@ mysql_select_db(str_replace("`", "", $database_name, $conn))) {

        to this:
            if (!@ mysql_select_db(str_replace("`", "", $database_name), $conn)) {
        

          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 18367
          • 834 Posts
          I remember having a similar problem when I first installed modx.

          Once you’ve done that first test and failed, it won’t actually let you install again to that database. It considers the database has already been setup and won’t allow you to install to that database. So reloading the screen, pushing the back button etc won’t achieve anything.

          The easiest thing to do is simply create another database and start again.

          Easy if you’re setting up on a local server, and depending on what access you have to your live host it can be easy or tricky.

          If you are on a live server the host probably will put a prefix like "shelleys_" in.

          This should not be a problem. You just add the name of your database after it. IE |"shelleys_modx"

          The table prefix on the next line will then just be "shelleys_"

          Your database host will probably be localhost and your database login name will be something like "shelleys_[your login name]"





            Content Creator and Copywriter
            • 25663 MODX Staff
            • 12,272 Posts
            Quote from: dev_cw at Aug 07, 2008, 05:47 AM


            line 19 of connection.databasetest.php this line won’t work change this:
                if (!@ mysql_select_db(str_replace("`", "", $database_name, $conn))) {

            to this:
                if (!@ mysql_select_db(str_replace("`", "", $database_name), $conn)) {
            


            Hi Shane, should that be a part of the standard installer routine, or should it switch that line based on an earlier check?
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 7231
              • 4,205 Posts
              Ryan, I think this has already been patched in the svn version. I will need to check to answer your question since it was implemented by Coroico, but I think it was just a typo.
                [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                Something is happening here, but you don't know what it is.
                Do you, Mr. Jones? - [bob dylan]