We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23299
    • 1,161 Posts
    I can’t login to one of my Evo sites?

    I get this strange error message?



    <b>Warning</b>: mysql_num_rows(): supplied argument is not a valid MySQL result resource in <b>/home/username/public_html/sitename/manager/processors/login.processor.php</b> on line <b>70</b>

    Incorrect username or password entered!


    Please, how do fix this? I check my database with the host cpanel and there are a few errors? I tried repairing the database by hitting the repair button.

    I see this in the middle of many "ok" reports:

    "Error : Incorrect key file for table ’modx_user_attributes’; try to repair it
    error : Corrupt"

    and:

    "Error : Incorrect key file for table ’modx_user_roles’; try to repair it
    error : Corrupt"



    Thanks!
      • 21257 MODX Staff
      • 730 Posts
      Can you view the contents of those two tables?
        Mike Schell
        Lead Developer, MODX Cloud
        Email: [email protected]
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
        • 23299
        • 1,161 Posts
        Forgive my ignorance, but how do I do that?

        Thanks...
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          In phpMyAdmin, select the table then the "browse" tab.
            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
            • 23299
            • 1,161 Posts
            If I click on one of the offending two tables I get this message:


            Error
            SQL query: Edit

            SHOW FULL FIELDS FROM `modx_user_attributes` ;


            MySQL said:

            #1034 - Incorrect key file for table ’modx_user_attributes’; try to repair it


            Not sure what needs to be done to repair this?
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Did you use the Repair function of your phpMyAdmin on the tables?
                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
                • 23299
                • 1,161 Posts
                In the Type and Collation columns I notice that they show "in use" where as all the others say myISAM utf8_unicode_ci...

                I checked these tables and chose repair. It then lists a series of errors with messages that say "Incorrect key file for table ’modx_user_attributes..." and "Corrupt" etc...

                If I then go to the site frond end and try login I still get this message that says:

                <b>Warning</b>: mysql_num_rows(): supplied argument is not a valid MySQL result resource in <b>/home/sitename/public_html/sitename/manager/processors/login.processor.php</b> on line <b>70</b>

                Incorrect username or password entered!
                  • 36404
                  • 307 Posts
                  hi,

                  if i were you i would do some local test
                  - first, make a dump of you database (export in phpMyAdmin) without any compatibility
                  (before, you can truncate/empty your prefix_manager_log and prefix_event_log table that may be heavy and not that usueful...)
                  - then, open the resulting sql file with your text editor to see if everything look okay , pay attention to all the _user_ tables and look if ids and internalKey’s match
                  - erase all the collation if there are (it shouldn’t but well)
                  - then, locally, create a new database set its collation on utf8_general_ci not unicode_ci
                  - and, last but not least, import your sql file in that new db and see if everything is ok (if not, you may have trouble importing...)

                  if ( everything != ok ): well then, tell us what happened...

                  if ( everything == ok ): then, cross your fingers hard, delete all the tables in the former db, set its collation on utf8_general_ci and reimport you sql file, things should go better

                  endif; smiley

                  Have swing
                    réfléchir avant d'agir
                    • 23299
                    • 1,161 Posts
                    I am not quite sure if I follow all that correctly? Unfortunately I have little experience working with databases like you describe.

                    I do plan on backing up everything plus using a deep vacuum application I have to download the entire site. My hunch is that with my own knowledge base the best course for me here might be to dump my entire site from the server and start with a fresh install and rebuild everything from scratch. Not something I relish doing but at least this way I can get access to my site without going crazy. Fortunately there is almost no date stamped content or blog pages that would be messed up with this approach.

                    I have no idea why this mess has happened? To be honest I am beginning to lose some of my love and enthusiasm for MODx. I have had some issues and I am still stuck in the no-man’s-land between Evo and Revo. Most of my sites are image heavy and so far my experience with Revo seem to require a baffling amount of work, investigation and confusion. I like how MODx is so flexible but there are times I wish some of the core features were more plug and play without having to configure complicated snippet calls and custom php coding. So far I still feel more comfortable with EVO, but more and more this community is moving on with Revo. I sense Evo concerns gain less traction on this forum as well. Maybe this is all from my recent frustrating problems but this is my gut sense generally...

                    Thanks!
                      • 21257 MODX Staff
                      • 730 Posts
                      Thanks for voicing your concerns about Evo and Revo and MODX in general. That is very important feedback for us to hear.

                      For this particular issue, we’re dealing with a couple of corrupt MySQL tables, and I’m completely certain that MODX cannot cause such an issue, nor is there a realistic way that I know of for it or any other web application to gracefully recover from corrupt tables. Likely something happened with the MySQL server during a write operation; this can happen as a result of a MySQL server crash for example.

                      You might be able to find a MODX partner or someone in the community who can quickly help out on the database side - sounds like it might save you a lot of time and work. It shouldn’t take long to recreate those tables, but it does require enough db knowledge that it would take a long time to sort out over the forums.

                      Best of luck getting it back together,
                      Mike
                        Mike Schell
                        Lead Developer, MODX Cloud
                        Email: [email protected]
                        GitHub: https://github.com/netProphET/
                        Twitter: @mkschell