• Resolved bourgesloic

    (@bourgesloic)


    Hello,

    Thanks for your great plugin.
    I have also wordfence plugin installed and a fatal error is thrown :

    [09-Jul-2023 11:23:02 UTC] PHP Fatal error: Uncaught Error: The SQLite3 object has not been correctly initialised or is already closed in /home/lboserv1/public_html/dev-locbateau.lbo-services.fr.fo/wp-content/object-cache.php:1382
    Stack trace: 0 /home/lboserv1/public_html/dev-locbateau.lbo-services.fr.fo/wp-content/object-cache.php(1382): SQLite3Stmt->bindValue(':name', 'wordfence|allop…', 3) 1 /home/lboserv1/public_html/dev-locbateau.lbo-services.fr.fo/wp-content/object-cache.php(1324): WP_Object_Cache->get_by_name('wordfence|allop…') 2 /home/lboserv1/public_html/dev-locbateau.lbo-services.fr.fo/wp-content/object-cache.php(1766): WP_Object_Cache->cache_item_exists('wordfence|allop…') 3 /home/lboserv1/public_html/dev-locbateau.lbo-services.fr.fo/wp-content/object-cache.php(2430): WP_Object_Cache->get('alloptions', 'wordfence', false, NULL) 4 /home/lboserv1/public_html/dev-locbateau.lbo-services.fr.fo/wp-content/plugins/wordfence/lib/wfConfig.php(288): wp_cache_get('alloptions', 'wordfence') 5 /home/lboserv1/public_html/dev-locbateau.lbo-services.fr.fo/wp-content/plugins/wordfence/lib/wfConfig.php(371): wfConfig::loadAllOptions() 6 /home/lboserv1/public_html/dev-locbateau.lbo-services.fr.fo/wp-content/plugins/wordfence/lib/wfConfig.php(531): wfConfig::hasCachedOption('liveTrafficEnab…') 7 /home/lboserv1/public_html/dev-locbateau.lbo-services.fr.fo/wp-content/plugins/wordfence/lib/wfConfig.php(921): wfConfig::get('liveTrafficEnab…') 8 /home/lboserv1/public_html/dev-locbateau.lbo-services.fr.fo/wp-content/plugins/wordfence/lib/wfLog.php(250): wfConfig::liveTrafficEnabled() 9 [internal function]: wfLog->logHit() 10 {main} thrown in /home/lboserv1/public_html/dev-locbateau.lbo-services.fr.fo/wp-content/object-cache.php on line 1382

    It seems to be cause by wp_cache_close function which is called by wordpress whith shutdown_action, and wordfence make operations after that.

    This function should do anything (as written by wordpress) but not in your plugin (I took a look in other object cache plugin like redis, and wp_cache_close has only a return true line).

    I suppose that the best fix would be to change wp_cache_close with return true to avoid this type of error.

    Thanks a lot for your help.
    Best regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author OllieJones

    (@olliejones)

    Thanks for your report.

    https://github.com/OllieJones/sqlite-object-cache/issues/36

    This is a defect in Wordfence. It was a latent defect, but with my plugin it is not. There’s sometimes a race to be last between various plugins — to hook shutdown with the highest imaginable priority. It looks like Wordfence wins that race on your site, and then tries to use WordPress facilities like the cache after shutdown. I know there are other plugins in that race.

    My plugin needs its close operation to avoid memory leaks and data inconsistency. I cannot just abandon my SQLite3 object by doing nothing in my close function.

    I’ll try to figure out a workaround. It probably involves joining that race to be last. I was hoping to stay out of it.

    Plugin Author OllieJones

    (@olliejones)

    Fixed in 1..3.5.

    Thread Starter bourgesloic

    (@bourgesloic)

    Thanks a lot.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Incompatibility with Wordfence plugin’ is closed to new replies.