We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12776
    • 4 Posts
    Hi guys,

    Just starting out with ModX to revamp my site, but the installation fails.  Hope you can help a newbie. I get the following feedback:
    Creating connection to the database: OK!
    
    Selecting database `modx`: Database selection failed... The database does not exist. Setup will attempt to create it.
    
    Creating database `modx`: Database creation failed! - Setup could not create the database!


    Futhermore:
    Warning: loadextension(/manager/includes/extenders/dbapi..class.inc.php): failed to open stream: No such file or directory in /home/www/<my domain>/manager/includes/document.parser.class.inc.php on line 42
    
    Warning: loadextension(): Failed opening '/manager/includes/extenders/dbapi..class.inc.php' for inclusion (include_path='/home/www/<my domain>/manager/includes/') in /home/www/<my domain>/manager/includes/document.parser.class.inc.php on line 42
    
    Fatal error: Cannot instantiate non-existent class: dbapi in /home/www/<my domain>/manager/includes/document.parser.class.inc.php on line 43


    I suspect the "/home/www/" prefix since I’m hosting my site external, and I don’t have access to anything but my domain (at least via FTP)

    I’m definately not a PHP guru, but I was already looking at the $base_path, but don’t know where it is assigned...

    So, I welcome your suggestions.

    Cheers,

    IllO

    BTW: I’ve checked for previous posts, but my queries didn’t had no results since they where too general...

    // Edit: BTW I hope I’ve posted this at the right place, since I’m a newbie here.
      If I could start again
      A million miles away
      I would keep myself
      I would find a way
      • 7923
      • 4,213 Posts
      It says that dbapi class is not found.. seems to me that all files did not get uploaded correctly.. maybe try to re-upload.

      The database user that you use must have rights to create databases on the server. It seems that there is no permissions to create new databases.. So you either need to create on using phpmyadmin or some other mysql client, or provide allready exsisting database name (if you dont have rights to create new ones for example), or edit your database user rights and add right to create new database.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 10487 MODX Staff
        • 1,535 Posts

        I suspect the "/home/www/" prefix since I’m hosting my site external, and I don’t have access to anything but my domain (at least via FTP)
        Correct, I’ve just had this error myself. If the installer script bombs out when setting up the database, it fails to write the config.inc.php that is needed to define the $base_path required for a number of functions in MODx, including the loadextension() method.

        As doze said, creating the database prior to running the installer should solve the issue for you. Perhaps, something to take away from this is that the installer failure actions need to be handled more robustly (ie. not direct someone to a page that will inherently fail)
          Garry Nutting
          Senior Developer
          MODX, LLC

          Email: [email protected]
          Twitter: @garryn
          Web: modx.com
          • 12776
          • 4 Posts
          Thnanx doze & garryn for your reply.

          To answer the question about MySQL dbaccess... I must have, since I previously installed Coppermine and deleted all the coppermine tables previous to ModX installation wink

          True, the tables are not created, and yes I can create them manually... That’s why I suspected the path, since it looked like the necessary files couldn’t be found.

          I’ll see if I can find a piece of SQL code. Suggestions are welcome ofcourse smiley

          Cheers,

          IllO

          BTW... I forgot these:

          Hosting OS Proprietary *nix
          PHP version 4.4.1
          MySQL version 4.0.24
            If I could start again
            A million miles away
            I would keep myself
            I would find a way
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            When you get to the form for database information in the installation, the first field requires the name of the database. It appears from the error that you left that field at the default of "modx".

            Testing the database connection will give you a blue message that it was able to connect to the MySQL database engine, but your specified database does not exist. If it finds your database exists, it will give a green message that it connected to the database engine, and that your specified database exists.

            If the database does not exist, the installer will attempt to create it. But this only works if your user’s permissions allow database creation, which most shared hosting accounts do not.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 7923
              • 4,213 Posts
              Yes, i did not say that you need to create the tables manually, i said that create the database. But when you already have that old coppermine database ready what you want to use, define its name in the installation like Susan said.


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 12776
                • 4 Posts
                Quote from: doze at Oct 29, 2006, 03:59 AM

                Yes, i did not say that you need to create the tables manually, i said that create the database. But when you already have that old coppermine database ready what you want to use, define its name in the installation like Susan said.

                Thnx, the installation has finished succesfully. I already tried with the existing DB, but that didn’t work. I reupped all files, removed the DB and created a new one. After that the installation worked like a breeze.

                Now I’m just figuring out why I still get the same errors...

                Any cache cleaning needed?!?

                Cheers,

                IllOgical

                // Edit: to correct myself: the manager is available & seems to work... Time to hit the manuals...
                  If I could start again
                  A million miles away
                  I would keep myself
                  I would find a way