• Resolved nmxde

    (@nmxde)


    Hello,

    Using PHP8.1 I get this fatal error (works fine with 7.x and same configuration):

    wp-web-1 | 2022/06/10 20:44:28 [error] 30#30: *33 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: flock(): supplied resource is not a valid stream resource in /var/www/html/wp-content/plugins/w3-total-cache/Cache_File.php:123
    wp-web-1 | Stack trace:
    wp-web-1 | #0 /var/www/html/wp-content/plugins/w3-total-cache/Cache_File.php(123): flock(Resource id #687, 3)
    wp-web-1 | #1 /var/www/html/wp-content/plugins/w3-total-cache/ObjectCache_WpObjectCache_Regular.php(293): W3TC\Cache_File->set('0transientw3tc....', Array, 604800)
    wp-web-1 | #2 /var/www/html/wp-content/plugins/w3-total-cache/ObjectCache_WpObjectCache.php(50): W3TC\ObjectCache_WpObjectCache_Regular->set('w3tc.verify_plu...', true, 'transient', 604800)
    wp-web-1 | #3 /var/www/html/wp-content/object-cache.php(67): W3TC\ObjectCache_WpObjectCache->set('w3tc.verify_plu...', true, 'transient', 604800)
    wp-web-1 | #4 /var/www/html/wp-includes/option.php(937): wp_cache_set('w3tc.verify_plu...', true, 'transient', 604800)
    wp-web-1 | #5 /var/www/html/wp-content/plugins/w3-total-cache/Generic_Plugin_AdminCompatibility.php(60): set_transient('w3tc.verify_plu...', true, 604800)
    wp-web-1 | #6 /var/www/html/wp-includes/class-wp-hook.php(307): W3TC\Generic_Plugin_AdminCompatibility->verify('')
    wp-web-1 | #7 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    wp-web-1 | #8 /var/www/html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
    wp-web-1 | #9 /var/www/html/wp-admin/admin-header.php(303): do_action('admin_notices')
    wp-web-1 | #10 /var/www/html/wp-admin/plugins.php(605): require_once('/var/www/html/w...')
    wp-web-1 | #11 {main}

    Any help would be appreciated.
    Tobias

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter nmxde

    (@nmxde)

    I can access the admin area. The error occurs just when accessing content to be cached. Just in case this is helpful to find the root cause (and not obvious anyhow).

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @nmxde

    Thank you for reaching out and I am happy to assist you with this.
    Please go to W3TC settings in Performance>General Settings, scroll down to Miscellaneous, and see if the option “Enable file locking” is enabled? If so, please disable the option, save all settings, purge the cache, and see if the problem persists?
    Thanks!

    Thread Starter nmxde

    (@nmxde)

    Hi Marko.

    Sorry for the delay. Thanks for the useful and fast reply! This solved the problem. Is there anything to worry about not using file locking (when using local block storage)?

    Thanks again,
    Tobias

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @nmxde

    Thank you for your feedback.
    File locking may cause problems on some environments. And to answer your question, no there is nothing to worry about if the option is disabled, in fact, it’s not enabled by default.
    Thanks!

    Thread Starter nmxde

    (@nmxde)

    Perfect. Thanks!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @nmxde

    You are most welcome!

    We would really appreciate it if you could take a minute and post a review?here. This will help us to continue offering a top-notch product to users.
    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Uncaught TypeError’ is closed to new replies.