We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27210
    • 158 Posts
    SOLUTION: - replaced the corrupt file \manager\processors\save_user.processor.php (it was zero bytes)

    THANK YOU to mconsidine (Matt) for pm’ing many times to help me find this! Made my day, week and month - i’m about to put up my 3rd MODx site, this time using Revolution!

    Original post below:
    i have 2 sites running MODx. One of them has a corrupt security portion of the database where i can not create new users. i have upgraded from 1.0.2 to 1.0.4 which does not solve the problem.

    i’m really screwed if i can’t figure this out. I have posted about this here http://modxcms.com/forums/index.php/topic,52773.msg305551.html#msg305551 but no luck

    in searching the board i have seen other similar issues.

    surely there must be some way to reset the security on the database.

    are there any tools to check the integrity of the database?

    I’m so tired of this issue that i’m about to abandon MODx.
      • 18913
      • 654 Posts
      How about checking the database with phpMyAdmin?
        • 18913
        • 654 Posts
        Also, what do the system logs say is happening (e.g. Reports -> System Events or Reports -> Manager Actions)?
          • 27210
          • 158 Posts
          thanks for the suggestions mconsidine

          php shows no errors (check table, analyze table)

          when i "add" the user the screen closes but the user is not created and no system event entry is created. a manager action "creating user" and "saving user" is logged but the user record is NOT created (i looked in the database)
            • 3749
            • 24,544 Posts
            Is there anything in the MODx error log or the server error log?
              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
              • 27210
              • 158 Posts
              where are these logs? (are they accessible from within the MODx manager?, are they a separate file, etc.)

              sorry for the dumb questions but i can’t find them...
                • 18913
                • 654 Posts
                The error.log files would be in the root or subfolder (depending on where the error was generated, I think). Or, if you have something like cPanel, I think there’s a shortcut to viewing the error logs present on your site.

                That said, what is your local install running? Is it XAMPP? One thing I just tested is this :
                - go to your mysql install, e.g. c:\xampp\mysql\bin and edit my.ini to set both "general_log" and
                "slow_query.log" to 1.
                - stop and restart the mysql server
                - with the default settings I had, in xampp/mysql/data there would be these files getting created (possibly):
                mysql.err, mysql.log, mysql-slow.log
                - now, try adding a new manager user, and check the logs to see what happened. There should be somewhere between a blizzard and a crapload of entries - if you watched the clock you should be able to narrow down the entries related to your action by looking at the timestamp.

                This gives tells you what’s going on from the database’s point of view.

                Don’t forget to reset the my.ini file and stop/restart the mysql server when you figure out what happened. This might give an insight as to what is going on with the online version...
                Matt
                  • 27210
                  • 158 Posts
                  i noticed that the error reporting is not working when trying to create a user.

                  for example, if i just enter a user name but no email address, the MODx Manager does not give an error message "E-mail address doesn’t seem to be valid!" which it should.
                    • 27210
                    • 158 Posts
                    Thanks Matt - very helpful!

                    Not much in either the mqsql-slow.log or the mysql.err log however below is the mysql.log which does have something.

                    i’m trying to create a user named "jeff" (i’m logged in as "signcarver") - "jeff" doesn’t show up anywhere in the log file.

                    Do you see anything wrong below?

                    C:\xampp\mysql\bin\mysqld.exe, Version: 5.1.41-log (Source distribution). started with:
                    TCP Port: 3306, Named Pipe: MySQL
                    Time                 Id Command    Argument
                    100923 19:26:23        1 Connect    root@localhost on 
                                1 Init DB    atlalum
                                1 Query    SET NAMES utf8
                                1 Query    SELECT setting_name, setting_value FROM `atlalum`.`atlalum_user_settings` WHERE user=1
                                1 Query    REPLACE INTO `atlalum`.`atlalum_active_users` (internalKey, username, lasthit, action, id, ip)
                                VALUES (1, 'signcarver', '1285284383', '75', NULL, '::1')
                                1 Query    SELECT
                            mu.id,
                            mu.username,
                            rname.name AS role,
                            mua.fullname,
                            mua.email,
                            IF(mua.gender=1,'Male',IF(mua.gender=2,'Female','-')) AS gender,
                            IF(mua.blocked,'Yes','-') as blocked FROM `atlalum`.`atlalum_manager_users` AS mu INNER JOIN `atlalum`.`atlalum_user_attributes` AS mua ON mua.internalKey=mu.id LEFT JOIN `atlalum`.`atlalum_user_roles` AS rname ON mua.role=rname.id ORDER BY username
                                2 Connect    root@localhost on 
                                2 Init DB    atlalum
                                2 Query    SET NAMES utf8
                                2 Query    INSERT INTO `atlalum`.`atlalum_manager_log`
                                (timestamp, internalKey, username, action, itemid, itemname, message) VALUES
                                ('1285284383',
                                 '1',
                                 'signcarver',
                                 '75',
                                 '-',
                                 '-',
                                 'User/ role management')
                                1 Quit    
                                2 Quit    
                                3 Connect    root@localhost on 
                                3 Init DB    atlalum
                                3 Query    SET NAMES utf8
                                3 Query    SELECT setting_name, setting_value FROM `atlalum`.`atlalum_user_settings` WHERE user=1
                                4 Connect    root@localhost on 
                                4 Init DB    atlalum
                                4 Query    SET NAMES utf8
                                4 Query    SELECT count(*) FROM `atlalum`.`atlalum_user_messages` where recipient=1 and messageread=0
                                4 Query    SELECT count(*) FROM `atlalum`.`atlalum_user_messages` where recipient=1
                                3 Quit    
                                4 Quit    
                    100923 19:26:25        5 Connect    root@localhost on 
                                5 Init DB    atlalum
                                5 Query    SET NAMES utf8
                                5 Query    SELECT setting_name, setting_value FROM `atlalum`.`atlalum_user_settings` WHERE user=1
                                5 Query    REPLACE INTO `atlalum`.`atlalum_active_users` (internalKey, username, lasthit, action, id, ip)
                                VALUES (1, 'signcarver', '1285284385', '11', NULL, '::1')
                                5 Query    SELECT internalKey, username FROM `atlalum`.`atlalum_active_users` WHERE `atlalum`.`atlalum_active_users`.action=12 AND `atlalum`.`atlalum_active_users`.id=0
                                5 Query    select name, id from `atlalum`.`atlalum_user_roles`
                                5 Query    SELECT name, id FROM `atlalum`.`atlalum_membergroup_names` ORDER BY name
                                6 Connect    root@localhost on 
                                6 Init DB    atlalum
                                6 Query    SET NAMES utf8
                                6 Query    INSERT INTO `atlalum`.`atlalum_manager_log`
                                (timestamp, internalKey, username, action, itemid, itemname, message) VALUES
                                ('1285284385',
                                 '1',
                                 'signcarver',
                                 '11',
                                 '-',
                      • 18913
                      • 654 Posts
                      That’s not your complete log file, is it? After the point where it cuts off you should see the entries involved with saving the new user. In my case, I do see the info related to the new user.

                      If you want to PM the full log file, feel free.

                      FWIW, there is only one consistent difference I see between what you have posted and what I have.

                      Your database has a query SET NAMES utf8.
                      Mine is SET CHARACTER SET utf8.

                      I don’t know if this makes a difference or not. And I don’t know offhand where in phpMyAdmin this could get changed. Or if changing it will fubar things ...