Hello guys!
I was trying to log in to my administrator account. When I type in wrong password I get "Wrong username/password" message. When I type correct login and password - I get a message
"error replacing into active users! SQL: REPLACE INTO `dbase`.modx_active_users (internalKey, username, lasthit, action, id, ip) values(1, ’admin’, ’1186069141’, ’’, NULL, ’ip’) INSERT command denied to user ’vamazalov_modx’@’numbers’ for table ’modx_active_users’"
Does anybody have any ideas?
Thank you in advance!
Vadim
-
☆ A M B ☆
- 24,524 Posts
Sounds like the database table that holds permissions for MySQL has been corrupted. If you have access to the database (phpMyAdmin, for example) you can try backing up the modx_active_users table structure, dropping it, and then re-creating it.
I know this is a really old thread but I just had this problem and found the solution.
In the accesscontrol.inc.php file the first value in the REPLACE INTO statement is not quoted... this is causing a column count error in MySQL.
in 0.9.6.3 I changed this line (161) from
VALUES (%d, \’%s\’, \’%d\’, \’%s\’, %s, \’%s\’)’,
to:
VALUES (\’%d\’, \’%s\’, \’%d\’, \’%s\’, %s, \’%s\’)’,
and no more errors... not sure why it started happening suddenly (likely some security config updated on my hosting provider).
-
MODX Staff
- 10,725 Posts
Your change would break the process for MySQL Strict mode because the first column is expected as a numeric value. Something else is wrong here, but it is not clear to me what it is; seems a bad record got into the table and doing a replace on it simply won’t work with no id value. Perhaps we just need to validate the value being passed there...