We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9207 ☆ A M B ☆
    • 2,475 Posts
    I’m ideally trying to do an upgrade from 1.0.2, but I’ll settle for a fresh install at this point... I’m getting the same error for fresh install, upgrade install, or advanced upgrade: I can get to the point where I test my db connection (no problem), but when I try to test selection of my database, I get an odd error: "Could not connect to the mysql server." Seems odd... I JUST connected... why does it fail the second time?

    → Test database server connection and view collations.

    Connecting to mysql server: Success!

    Connection character set:
    Collation:

    → Create or test selection of your database.

    Checking database:Could not connect to the mysql server.

    I’ve tested my database username and password on the command line, and I can login to mysql using the same username/password. What else can I check?

    This is running PHP 5.3.1, Cent OS 5.3
      • 28215
      • 4,149 Posts
      Whats your MySQL client and server version?

      Also, what charset and collation are you using?
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 9207 ☆ A M B ☆
        • 2,475 Posts
        Charset: utf8
        Collation: utf8_general_ci

        Those are the only options available in the drop down menus of the install page. Do I need to edit the default collation somewhere? This a server that I own (as in, I have root access), so any config option is fair game.

        mysql> select version();
        +-----------+
        | version() |
        +-----------+
        | 5.0.77    | 
        +-----------+
        1 row in set (0.00 sec)


          • 9207 ☆ A M B ☆
          • 2,475 Posts
          Problem was simple: I was trying to upgrade over an Evo install... I’ll have a look at http://bobsguides.com/migrating-revolution.html

          Thanks, Jason for chiming in.
            • 32699 ☆ A M B ☆
            • 427 Posts
            Ouchy. That’s not going to work, as you found out.

            I have two sites I will be looking at importing from evo to revolution in the next few days myself.
              Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

              Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com
              • 9207 ☆ A M B ☆
              • 2,475 Posts
              Yeah, and I’m running into other problems as well... I’m trying this on 2 separate servers, and I’ve had the same problem on both servers... I get to the page to test my database connection, and I get only a single Connection character set and only a single Collation available in the drop down... and no matter what I try, I get the error:

              Checking database:Could not connect to the mysql server.

              Now, on the one server where I was trying to do an upgrade over an existing 1.0.2 install, I tried doing a fresh install in a new directory, and BOOM, my drop-down menus for the Connection character set and for the available collations GREW HUGE. That was back to normal... so something with the upgrade conflicted with that step, but there wasn’t much going on in the logs except for a timezone error (Jason, by the way, the installer seemed to work fine even with that timezone error... until I got to a missing PHP module -- zlib).

              What’s interesting is that this SAME behavior is happening on another server I have (see server details here http://modxcms.com/forums/index.php/topic,43453.msg260171.html#msg260171) ... it’s also a fresh install, but I’m not getting any love in the character sets/collation menus -- only a single option is available for each (the default, no doubt). Apache logs don’t show much:
              File does not exist: /my/doc/root/favicon.ico

              I know my PHP modules are whacky on the other server... but there aren’t any errors during the (failed) install. For the record, it looks like this is the minimal config setting for PHP 5.3.1 to work with Revolution... but this is not what’s implied @ http://svn.modxcms.com/docs/display/revolution/Server+Requirements -- the official documentation mentions mhash and mcrypt, which I’m still struggling to get installed.

              # Are these the minimum PHP configuration settings?
              './configure' '--with-apxs2=/usr/local/bin/apxs' '--with-mysql' '--prefix=/usr/local' '--with-pdo-mysql' '--with-zlib'
                • 22303 MODX Staff
                • 10,725 Posts
                Ignore mhash/mcrypt, I don’t believe these are required for Revo; these were leftover requirements from Evo.

                zlib is required for the zip functionality at the moment, and is checked for before the actual installation step, but should not affect the database collection/character set issue you mention. This is something else entirely, and since the setup was just completely refactored prior to beta 5, may have an unknown dependency or other issue we need to resolve (though it’s not obvious what this might be).

                BTW, are you referring to an upgrade from a previous version of Revolution? Again Evolution to Revolution upgrades are not yet supported.
                  • 9207 ☆ A M B ☆
                  • 2,475 Posts
                  Thanks Jason. I was just saying that I was seeing the same behavior with this fresh install of Revolution as I saw when I (unsuccessfully) tried to upgrade Evo to Revo, and in both cases, I’m not seeing much in the error logs to lead me to what’s wrong. I updated the documentation.

                  UPDATE:
                  When I re-tried this today, I GOT THRU. I don’t know what I did differently. This is on my new server with a fresh install. I noticed that the installer WOULD NOT progress past the testing of the collations until I manually created the database (this time, all available were visible). I gave the user all privileges... privileges were flushed... but does the MySQL root user the only one that has privileges to create databases?

                  The install failed a few steps later, however. I got a blank screen in Firefox, and only a single table was created:
                  mysql> show tables;
                  +-----------------+
                  | Tables_in_revo  |
                  +-----------------+
                  | system_settings | 
                  +-----------------+


                  But the table was empty. I think this may have to do with the PHP configuration options... having a working set of PHP ./configure options is gonna be golden for this.

                  Any thoughts?
                    • 22303 MODX Staff
                    • 10,725 Posts
                    Quote from: Everett at Dec 20, 2009, 08:14 PM

                    I noticed that the installer WOULD NOT progress past the testing of the collations until I manually created the database (this time, all available were visible). I gave the user all privileges... privileges were flushed... but does the MySQL root user the only one that has privileges to create databases?
                    No, but a user must have the CREATE administrative privilege (e.g. GRANT CREATE TO user@localhost) in order to use the CREATE DATABASE command.

                    Quote from: Everett at Dec 20, 2009, 08:14 PM

                    The install failed a few steps later, however. I got a blank screen in Firefox, and only a single table was created:
                    mysql> show tables;
                    +-----------------+
                    | Tables_in_revo  |
                    +-----------------+
                    | system_settings | 
                    +-----------------+


                    But the table was empty. I think this may have to do with the PHP configuration options... having a working set of PHP ./configure options is gonna be golden for this.
                    If there was a missing extension of something, there would be a PHP FATAL error recorded in the error_log (or displayed if display_errors is enabled). I’m not sure what the problem could be, unless you haven’t given the database user all the privileges it needs. Otherwise, though your configure line looks kind of bare minimum compared to most I work with, the only thing missing I see is a --with-libxml-dir= option. Here is a sample from a working server we are using, but I this is not necessarily correct for all PHP versions or platforms:
                    './configure' '--with-gd' '--enable-gd-native-ttf' '--with-mysql' '--with-pdo-mysql' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-config-file-path=/etc/php.ini' '--with-libxml-dir=/usr/bin/xml2-config' '--with-mhash=/usr/local/lib/libmhash.so' '--with-curl' '--with-mcrypt=/usr/bin/libmcrypt-config' '--enable-cgi' '--with-zlib'
                      • 9207 ☆ A M B ☆
                      • 2,475 Posts
                      Thanks Jason.
                      If there was a missing extension of something, there would be a PHP FATAL error recorded in the error_log (or displayed if display_errors is enabled)
                      That makes sense to me... but I just re-tried this with display_errors=On and with error_reporting = E_ALL | E_STRICT
                      I didn’t see any errors, and there was nothing in the logs other than the favicon.ico missing.

                      Right after I click "Next" from the install contexts page, I end up on a white screen. I’ll try the various PHP configurations and see if I can’t make that work.