• Resolved Asif

    (@asifanwar451)


    Hey,
    After upgrading to PHP 8.0 from PHP 7.4, the Database Cache feature doesn’t work. We use Memcached as the Cache Method. We are on WordPress Version 5.8.1 and using 10.4.20-MariaDB.

    The site displays the following message – There has been a critical error on this website. Here are the errors from the log file,

    AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: mysqli_num_fields(): Argument #1 ($result) must be of type mysqli_result, bool given in /public_html/wp-includes/wp-db.php:3402\nStack trace:\n#0 /public_html/wp-includes/wp-db.php(3402): mysqli_num_fields()\n#1 /public_html/wp-includes/wp-db.php(645): wpdb->load_col_info()\n#2 /public_html/wp-content/plugins/w3-total-cache/DbCache_WpdbInjection_QueryCaching.php(176): wpdb->__get()\n#3 /public_html/wp-content/plugins/w3-total-cache/DbCache_WpdbNew.php(119): W3TC\\DbCache_WpdbInjection_QueryCaching->query()\n#4 /public_html/wp-includes/wp-db.php(2695): W3TC\\DbCache_WpdbNew->query()\n#5 /public_html/wp-admin/includes/upgrade.php(2749): wpdb->get_results()\n#6 /public_html/...

    Appreciate the support.

    Thanks
    Asif

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @asifanwar451

    Thank you for reaching out and I am sorry about the issue you are experiencing.
    Have you tried restarting the Memcached service and clearing your database table and also purging the DB cache?
    Thanks!

    Thread Starter Asif

    (@asifanwar451)

    Hello Marko,

    I tried restarting the Memcache service and clearing the Database cache but it didn’t fix the issue. I didn’t clear the database table, which table you want me to clear.

    Thanks,

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @asifanwar451

    Thank you for the information.
    Can you please switch the DB caching method to disk and see if the issue persists? Make sure to save all settings and purge the cache once the caching method is changed.
    Thanks!

    Thread Starter Asif

    (@asifanwar451)

    Hey Marko,

    No, it didn’t work. After switching to the Dish caching method, cleared the DB cache and deleted the contents of /wp-content/cache folder but the issue still persists.

    Thanks
    Asif

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @asifanwar451

    Thank you for the information.
    This happens during the upgrade process as you can see in the last line of the call stack. The upgrade can be some edge case in your environment
    You should try to revert the PHP back and disable w3tc before the upgrade and check if it will work further.
    Thanks!

    Thread Starter Asif

    (@asifanwar451)

    Hey Marko,
    An update here. We found that it’s conflicting with the Header and Footer Manager plugin. The DB cache works fine if we disable this plugin. I have been in contact with W3 Total premium support. They have advised me to reach out to Header and Footer Manager plugin support.

    Thanks for the support here.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @asifanwar451

    Thank you for the information.
    Yes, I am aware of that, and I was the one to suggest that.
    Thank you again and let me know if there is anything else Ic can help with.
    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Database Cache doesn’t work with PHP 8.0’ is closed to new replies.