• Resolved modus

    (@modus)


    Hi, this happens on two nearly identical sites still based on WP 5.6. I got a fatal eror trying to open wp-login. After renaming the dirname I could log in. I checked that it is really version 5.1.7. Trying to reactivate it is impossible because of the following fatal error:

    Fatal error: Uncaught mysqli_sql_exception: Table ‘abcdefg.prefix_aiowps_audit_log’ doesn’t exist in /is/htdocs/xxxxxxxxxxxxxxxxxx/www/wp-includes/wp-db.php:2056 Stack trace: #0 /is/htdocs/xxxxxxxxxxxxxxxxxx/www/wp-includes/wp-db.php(2056): mysqli_query(Object(mysqli), ‘DESCRIBE prefix_…’) #1 /is/htdocs/xxxxxxxxxxxxxxxxxx/www/wp-includes/wp-db.php(1945): wpdb->do_query(‘DESCRIBE prefix…’) #2 /is/htdocs/xxxxxxxxxxxxxxxxxx/www/wp-includes/wp-db.php(2696): wpdb->query(‘DESCRIBE prefix_…’) #3 /is/htdocs/xxxxxxxxxxxxxxxxxx/www/wp-admin/includes/upgrade.php(2795): wpdb->get_results(‘DESCRIBE prefix_…’) #4 /is/htdocs/xxxxxxxxxxxxxxxxxx/www/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-installer.php(182): dbDelta(Array) #5 /is/htdocs/xxxxxxxxxxxxxxxxxx/www/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-installer.php(27): AIOWPSecurity_Installer::create_db_tables() #6 /is/htdocs/xxxxxxxxxxxxxxxxxx/www/wp-content/plugins/all-in-one-wp-security-and-firewall/wp-security-core.php(263): AIOWPSecurity_Installer::run_installer(”) #7 /is/htdocs/xxxxxxxxxxxxxxxxxx/www/wp-includes/class-wp-hook.php(287): AIO_WP_Security::activate_handler(”) #8 /is/htdocs/xxxxxxxxxxxxxxxxxx/www/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array) #9 /is/htdocs/xxxxxxxxxxxxxxxxxx/www/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #10 /is/htdocs/xxxxxxxxxxxxxxxxxx/www/wp-admin/plugins.php(193): do_action(‘activate_all-in…’) #11 {main} thrown in /is/htdocs/xxxxxxxxxxxxxxxxxx/www/wp-includes/wp-db.php on line 2056

    Edit: 5.15 is working

    • This topic was modified 1 year, 12 months ago by modus. Reason: info added
Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support aporter

    (@aporter)

    Hi,

    Thank you for the error log, it’s very helpful.

    For some reason the audit log table hasn’t been created on your site.

    Are you able to find out what version of MySQL you have? (you may need to ask your hosts)

    Are you also able to check if the tables aiowps_debug_log and aiowps_login_lockdown exist?

    Best Wishes,

    Ashley

    Thread Starter modus

    (@modus)

    Thanks for your reply, Ashley.

    Edit: sorry, I had a look at the wrong tab at first: yes, both of them do exist. debug_log ist completely empty.

    • This reply was modified 1 year, 12 months ago by modus.
    • This reply was modified 1 year, 12 months ago by modus.
    • This reply was modified 1 year, 12 months ago by modus.
    Thread Starter modus

    (@modus)

    And MySQL is “5.7.40-43-log”.

    Plugin Support aporter

    (@aporter)

    Hi,

    Sorry about the delay overnight.

    I’ve still not been able to reproduce the audit log table not being created.

    But I’ve got a tweaked copy of the plugin here that makes sure we don’t try to use the audit table if it doesn’t exist, which should prevent the errors your getting.

    It will also try again to create the audit log.

    But I still don’t know why the table hasn’t been created, if it doesn’t get created again would you be able to check with your hosts to see if theres errors in the SQL error logs for why that table isn’t being created on your server?

    Download for plugin zip is here:

    https://gofile.io/d/bI3CEt

    Best Wishes,

    Ashley

    Thread Starter modus

    (@modus)

    Thanks a lot and no sweat, it’s a Sunday after all. I just tested the version you provided, but the error remains the same and I can’t even activate it.

    I’ll return here if and when I got an answer from the hosting provider (HostEurope btw.)

    • This reply was modified 1 year, 12 months ago by modus. Reason: typo
    Plugin Support aporter

    (@aporter)

    Hi,

    Thanks for trying that zip.

    Having another look at your error message and it seems to suggest that it doesn’t even get to the point where it would attempt to create the new table.

    WordPress before creating a new table runs the SQL

    “DESCRIBE TABLE_NAME”

    To see if it exists, it’s supposed to supress all errors for when it doesn’t but it doesn’t look like thats happening on your install for this particular table (The same code runs to create all other tables in plugins and they all appear to have worked so not sure whats different here)

    Just in case the error does come from the CREATE statement for this table but the logs cuts off just before I’ve got a new build of the plugin that tweaks that statement if you wanted to try:

    https://gofile.io/d/0JxUdO

    Failing that you could manually try and create the table with this SQL:

    CREATE TABLE {YOUR_PREFIX}aiowps_audit_log (
    
    id bigint(20) NOT NULL AUTO_INCREMENT,
    
    network_id bigint(20) NOT NULL DEFAULT '0',
    
    site_id bigint(20) NOT NULL DEFAULT '0',
    
    username varchar(60) NOT NULL DEFAULT '',
    
    ip VARCHAR(45) NOT NULL DEFAULT '',
    
    level varchar(25) NOT NULL DEFAULT '',
    
    event_type varchar(25) NOT NULL DEFAULT '',
    
    details text NOT NULL,
    
    stacktrace text NOT NULL,
    
    created INTEGER UNSIGNED,
    
    PRIMARY KEY (id),
    
    KEY username (username),
    
    KEY ip (ip),
    
    KEY level (level),
    
    KEY event_type (event_type)
    
    )

    Replace “{YOUR_PREFIX}” with your actual DB prefix.

    Other than that maybe your hosts will have more insight as to whats going on if they can check the PHP/SQL error logs or if theres a server configuration thats setup that could be causing it.

    You also mentioned this is happening on two sites, do you have more sites where this update is working and is it with the same hosting?

    Best Wishes,

    Ashley

    Thread Starter modus

    (@modus)

    Thanks again, I’ll try that, but probably not today.

    It only happened with those two sites, all other sites I maintain are hosted elsewhere and had no such problems.

    In case both suggestions fail, I’ll be back here as soon as I got the log files (they make you pay for them btw).

    Thread Starter modus

    (@modus)

    I just tried the 2nd plug-in version you provided, it returned the same error as before.

    Creating the table manually fixed the problem.

    Thanks a lot for your help!

    • This reply was modified 1 year, 11 months ago by modus.
    Plugin Support aporter

    (@aporter)

    Hi,

    Thank you for working with me on this.

    Really not sure why the plugin couldn’t automatically create the table for you.

    Glad that you was able to manually create it and resolve your issue.

    If theres anything else you need let me know.

    Best Wishes,

    Ashley

    Thread Starter modus

    (@modus)

    Thank YOU for working with me to solve it!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Fatal Error with 5.1.7: cannot login or reactivate’ is closed to new replies.