We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22950
    • 18 Posts
    I realize that there are several similiar posts but most seem to be re: WinXP & XAMPP. I am on Linux (LAMP) stack.

    Error message:
    Creating database ``: Database creation failed! - Setup could not create the database! from the install routine.

    I am using the following stack:
    OS: CentOS 4.2 on a virtual private server with root access
    PHP: 4.4.1
    MySQL: 4.0.25-standard

    Steps to install:
    1. FTP files from downloaded zip (I know the basics but not really up to speed on untarring files)
    2. created config.inc.php file. (I tried a simple blank html file and a blank php file [?>php] and put it in the manager/includes file folder. Do I use a simple blank html file or other?
    3. I created a modx database from my cpanel. (apparantly the install process is not recognizing this). Is there a particular folder that it needs to be in?
    4. Per the install instructions I have changed the permissions on files/folders (e.g. 777)
    5. I then go through the install routine and get the following message:

    Creating database ``: Database creation failed! - Setup could not create the database! from the install routine.

    Next page.
    Warning: loadextension(/manager/includes/extenders/dbapi..class.inc.php): failed to open stream: No such file or directory in /home/brilearn/public_html/mod/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/brilearn/public_html/mod/manager/includes/’) in /home/brilearn/public_html/mod/manager/includes/document.parser.class.inc.php on line 42

    Fatal error: Cannot instantiate non-existent class: dbapi in /home/brilearn/public_html/mod/manager/includes/document.parser.class.inc.php on line 43



    I have tried uninstalling and reinstalling three times so you help on this would be greatly appreciated.

    pearcy






    • This strikes me as rather strange:

      /manager/includes/extenders/dbapi..class.inc.php

      it looks like the $database_type variable is not in your config.inc.php; the first five lines of which should be:

      <?php
      	/**
      	 *	MODx Configuration file
      	 *
      	 */
      	$database_type = "mysql";
      


      The config.inc.php should just be a blank PHP file with no content before the installation process. Afterwards, it should be about 41 lines long, and start with the above. Can you confirm?
        • 22950
        • 18 Posts
        I uploaded a new blank config.inc.php file and still received the same error result on the next page.

        Warning: loadextension(/manager/includes/extenders/dbapi..class.inc.php): failed to open stream: No such file or directory in /home/brilearn/public_html/mod/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/brilearn/public_html/mod/manager/includes/’) in /home/brilearn/public_html/mod/manager/includes/document.parser.class.inc.php on line 42

        Fatal error: Cannot instantiate non-existent class: dbapi in /home/brilearn/public_html/mod/manager/includes/document.parser.class.inc.php on line 43
          • 3763
          • 155 Posts
          Hello pearcy,

          I have installed MODx on three CentOS boxes and it worked perfect wink
          In your first post you said you have root access, you mean SSH?

          I’ve always done this in the shell (changed a bit to fit your paths):
          chmod 755 /home/brilearn/public_html/mod/
          chmod -R 755 /home/brilearn/public_html/mod/
          cd /home/brilearn/public_html/mod/
          touch manager/includes/config.inc.php
          chmod 777 assets/cache/ assets/cache/siteCache.idx.php assets/cache/sitePublishing.idx.php assets/images/ assets/export/ manager/includes/config.inc.php
          rm -fdr install/

          This is for a fresh install.

          I must say, I’ve tested MODx on XAMPP on WinXP SP2, Fedora Core 5 (both with Apache 2.2, PHP 5.1+, MySQL 5.0.18), CentOS (Apache 2.0 and 1.3, PHP 4.3.9 and PHP 4.4.1, MySQL 4.0.25) ... all worked fine for me laugh
          The only thing that would be nice for the MODx installation...if DB is not set, try to create it if MySQL user has enough privileges.

          Boby
            ...my Photo Gallery on Flickr...
            • 22950
            • 18 Posts
            Thanks Boby,

            Yes, I do have SSH.  I also have PuTTY.  The box is on a hosted Virtual Private Server. 

            I have installed several packages via Fantastico which have all worked (e.g. Typo3, phpBB, etc.)  Of course Fantastico automatically installs the database.  I have created a new database via cPanel - mySQL databases in the same directory as the other databases.  I also can use phpMyAdmin. I have created a user that has all privilages. 

            Q: I am wondering if I need to see if the database I created is in the correct path?  I am new to this but just seems like a logical thing to check. 
            I get this message on the connections information page after I click "test connection"
            Connection to host: passed...    Checking database: failed - modx does not exist!

            I will try your suggestions.  I really want to get this working and I would like to understand more Linux commands.

            Time permitting, kindly send me more commands that would allow me to start from scratch using the comand line; such as:
            a. how to delete the existing files/folders 
            b. how to grab the tar package from the FTP site and untar it.
            c. I now have the "how to change the permissions"  smiley
            d. I have already created the database and user (I could create another one in a specific folder/path is that is needed)
            e. I know how to initiate the install command from the browser.

            In addition, if you have a recommended resource such as a book or online link that covers these basics that would suffice. 

            Thanks again, 
            pearcy

            • FYI, the check to see if the database exists is only that. A check. If you go ahead and install, MODx will attempt to create the database, though their are some specific configurations of PHP/MySQL that will not create the tables using the method MODx 0.9.1 used; this has been resolved in SVN and will be fixed in the next release. Of course, the db user you specify has to have sufficient permissions to create databases.

              Now that you have a blank config.inc.php file, if you run the installation process again from the beginning, it should write the proper contents to the file and solve your issue.
                • 22950
                • 18 Posts
                I have tried several times and I still get the same message.

                ************
                Setup will now attempt to setup the database:

                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!

                ****************

                and then on the next page after selecting "close" I get:

                **********
                Warning: loadextension(/manager/includes/extenders/dbapi..class.inc.php): failed to open stream: No such file or directory in /home/brilearn/public_html/mod/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/brilearn/public_html/mod/manager/includes/’) in /home/brilearn/public_html/mod/manager/includes/document.parser.class.inc.php on line 42

                Fatal error: Cannot instantiate non-existent class: dbapi in /home/brilearn/public_html/mod/manager/includes/document.parser.class.inc.php on line 43

                ************

                Right now I am trying to change the permissions via the commnand line to see if that works.

                  • 22950
                  • 18 Posts
                  I just tried the recommendations from Boby and I still get the same error messages.

                  Any other ideas?
                    • 22950
                    • 18 Posts
                    How about importing the database manually back into the application to recreate the database?

                    From an article at devshed.
                    http://www.devshed.com/c/a/PHP/Doing-More-With-phpMyAdmin-Part-1/6/

                    "Simply select the appropriate database (or create a new one as needed), switch to the SQL tab of the database module, and give phpMyAdmin the location of the output file.

                    The application will now automatically take care of detecting the file format and importing its contents into the selected database."

                    If someone points me in the right direction (where the database file is located) I can try this.




                    • Quote from: pearcy at Apr 02, 2006, 06:41 PM
                      Warning: loadextension(/manager/includes/extenders/dbapi..class.inc.php): failed to open stream: No such file or directory in /home/brilearn/public_html/mod/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/brilearn/public_html/mod/manager/includes/’) in /home/brilearn/public_html/mod/manager/includes/document.parser.class.inc.php on line 42

                      Fatal error: Cannot instantiate non-existent class: dbapi in /home/brilearn/public_html/mod/manager/includes/document.parser.class.inc.php on line 43
                      Is that the exact error message as it’s displayed on the screen?

                      Just that the dbapi..class.inc.php should be called dbapi.mysql.class.inc.php - could explain why it’s struggling to handle the database interactions.
                        Garry Nutting
                        Senior Developer
                        MODX, LLC

                        Email: [email protected]
                        Twitter: @garryn
                        Web: modx.com