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

    I’ve been trying for 2 days now to get modx revolution running on a server with these following specifications:

    openSUSE 11.2
    Apache/2.2.13
    MySQL 5.1.36
    PHP 5.3.3
    PHP -> MySQL
    Client API version 5.1.36
    PDO
    PDO support enabled
    PDO drivers mysql, sqlite, sqlite2
    pdo_mysql
    PDO Driver for MySQL enabled
    Client API version 5.1.36

    I have tried installing it 4 times, each time the install runs through gets to the end and I am presented with the login. No matter what I do at this login the username/password that I specified in the initial setup doesn’t work. I have even verified that the MD5 hash in the table is correct. Every time the install process runs several errors are presented in the apache error_log file. I have attached a snippet of the log to this post.

    After going nearly insane, I decided I would try this on a different server so I ran the exact same process on:

    CentOS 5.5x64
    Apache/2.2.8
    PHP 5.2.6
    MySQL 5.0.77

    No error messages in the error_log, setup completes successfully, and it works fine.

    Please provide some clarity into what is going on.

    thank you.
      • 3673
      • 7 Posts
      Hi,

      It is not an upgrade and I didn’t actually change anything from the defaults regarding the table prefix during the install.

      on ’/modx/setup/index.php?action=database’ the default db name is ’modx’ and the default table prefix is modx_

      In MySQL, the tables are created as such:

      modx.modx_users

      /**
      * MODx Configuration file
      */
      $database_type = ’mysql’;
      $database_server = ’localhost’;
      $database_user = ’modxdb’;
      $database_password = ’password’;
      $database_connection_charset = ’’;
      $dbase = ’`modx`’;
      $table_prefix = ’modx_’;

      thanks,
        • 3749
        • 24,544 Posts
        I don’t know of any way that could happen (the actual table names) and I’ve never seen it, but I think if you change the table prefix in the config.inc.php file to "modx.modx_" it may work.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 3673
          • 7 Posts
          Quote from: BobRay at Oct 13, 2010, 12:30 PM

          I don’t know of any way that could happen (the actual table names) and I’ve never seen it, but I think if you change the table prefix in the config.inc.php file to "modx.modx_" it may work.

          Hi again, I am sorry I am really confused by your answer.

          What is leading you to believe that there is a problem with the names of the tables?

          In the error message it says:

          1146 Table ’modx.modx_user_group_roles’ doesn’t exist

          but you can see in MySQL:

          mysql> select * from modx.modx_user_group_roles;
          +----+------------+-------------+-----------+
          | id | name | description | authority |
          +----+------------+-------------+-----------+
          | 1 | Member | NULL | 9999 |
          | 2 | Super User | NULL | 0 |
          +----+------------+-------------+-----------+
          2 rows in set (0.00 sec)

          It does exist.

          Anyway there is no error logged when I try to login and it fails, the errors/warnings are logged during the initial setup, so I am not even sure if the two are related.

          Is there a way that I can debug what is happening after I click the ’login button’ on the login form?





            • 3749
            • 24,544 Posts
            If you don’t specify a table prefix, MODx will create a table called modx_user_group_roles during the install, not modx.modx_user_group_roles. And, with a table prefix of modx_ as specified in the config.inc.php file, MODx will look for a table called modx_user_group_roles and it won’t find it in your database.

            At this point, since it is a fresh install, I would drop all the tables, delete all files in the core/cache/ directory except index.php and rename the core/config/config.inc.php file to core/config/config.inc.php.bak.

            Then run Setup again and make sure you don’t touch the table prefix field. See if you still get the odd table names.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 3673
              • 7 Posts
              Quote from: BobRay at Oct 13, 2010, 02:02 PM

              If you don’t specify a table prefix, MODx will create a table called modx_user_group_roles during the install, not modx.modx_user_group_roles. And, with a table prefix of modx_ as specified in the config.inc.php file, MODx will look for a table called modx_user_group_roles and it won’t find it in your database.

              At this point, since it is a fresh install, I would drop all the tables, delete all files in the core/cache/ directory except index.php and rename the core/config/config.inc.php file to core/config/config.inc.php.bak.

              Then run Setup again and make sure you don’t touch the table prefix field. See if you still get the odd table names.

              Hi, in this string: modx.modx_user_group_roles

              modx is the database name and modx_user_group_roles is the table name.


              Writing it as modx.modx_user_group_roles is perfectly valid.



                • 3673
                • 7 Posts
                #Deleting everything
                rm -rf modx
                mkdir modx
                cp modx*.zip modx
                cd modx
                unzip modx*.zip
                cd ..
                #setting really insecure permissions so that I know it is not the cause of the problem (will fix after I figure out what is causing the problem)
                chmod -R 777 modx
                #clearing database
                mysql
                mysql> drop database modx;
                mysql> create database modx;
                mysql> grant all on modx.* to modxuser@localhost identified by ’applez’;
                #running setup again
                http://ipaddress/modx/setup/
                clicked ’Select’
                clicked ’Next’
                Didn’t change anything and clicked ’Next’
                Entered modxuser for the username
                Entered applez for the password
                didn’t change the database name or the table prefix.
                clicked on "Test database server connection and view collations."
                clicked on "Create or test selection of your database"
                Entered admin for the ’Administrator username’
                Entered my email address for ’Administrator E-Mail’
                Entered applez for the ’Administrator Password’
                Entered applez for the ’Confirm Password’

                ***Please see screenshot attached***

                Clicked next and was given an installation summary with:

                Installation Summary
                Pre-installation tests were successful. Click Install below to continue.
                Checking PHP version: OK! Running: 5.3.3
                Checking PHP for zlib dependency: OK!
                Checking for SimpleXML: OK!
                Checking if memory limit is set to at least 24M: OK! Set to 128M
                Checking if sessions are properly configured: OK!
                Checking if /srv/www/htdocs/modx/core/cache directory exists: OK!
                Checking if /srv/www/htdocs/modx/core/cache directory is writable: OK!
                Checking if /srv/www/htdocs/modx/core/export directory exists: OK!
                Checking if /srv/www/htdocs/modx/core/export directory is writable: OK!
                Checking if /srv/www/htdocs/modx/core/packages directory exists: OK!
                Checking if /srv/www/htdocs/modx/core/packages directory is writable: OK!
                Checking if /srv/www/htdocs/modx/core/config/config.inc.php exists and is writable: OK!
                Creating connection to the database: OK!
                Clicked Install
                ----Apache error log fills up with errors like:
                [Thu Nov 12 07:33:51 2009] [error] [client redacted] PHP Warning: PDO::query(): SQLSTATE[42S02]: Base table or view not found: 1146 Table ’modx.modx_access_actions’ doesn’t exist in /srv/www/htdocs/modx/core/xpdo/xpdo.class.php on line 1859, referer: http://redacted/modx/setup/index.php?action=summary (I have attached full log as modxlog2.txt)

                Installation summary:

                Installation Summary
                Core installation was successful. Click next to complete the installation process.
                (scroll to bottom)

                Clicked Next
                "Thank you for installing"
                Clicked Login
                At the login screen entered:

                admin for the username
                applez for the password
                clicked login

                Login screen is returned again and again with no success.
                  • 3749
                  • 24,544 Posts
                  That’s certainly odd. Can you tell if those errors occurred during the install, or later when you tried to log in?

                  The only other thing I can think of is that either one or more files was corrupted during the download or upload.


                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 3673
                    • 7 Posts
                    Quote from: BobRay at Oct 13, 2010, 03:34 PM

                    That’s certainly odd. Can you tell if those errors occurred during the install, or later when you tried to log in?

                    The only other thing I can think of is that either one or more files was corrupted during the download or upload.


                    The messages appear in apache’s log file when I click ’Install’.

                    I used this command to download the file wget http://modxcms.com/download/pl/modx-2.0.3-pl.zip

                    The same command I used to download the file on the CentOS 5.5 server which I was able to successfully install Modx on using the same exact steps.

                    and there was no ’upload’ I unzipped the file directly on the server via SSH.


                      • 3749
                      • 24,544 Posts
                      I’m about out of ideas. maybe someone else can help. I have no clue how the tables got named that way unless there’s something strange about the server or MySQL configuration. MODx just prepends the table_prefix to the standard table names (user, site_content, system_settings, etc.).

                      You could try exporting the CentOS DB, dropping the problem tables from the problem install, and importing the DB from the CentOs install. Then run Setup in upgrade mode.
                        Did I help you? Buy me a beer
                        Get my Book: MODX:The Official Guide
                        MODX info for everyone: http://bobsguides.com/modx.html
                        My MODX Extras
                        Bob's Guides is now hosted at A2 MODX Hosting