• Hello,
    in the last several months we are noticing a lot of PHP Warnings on a daily basis, like ~30-40 warnings in the error log file every day. All of them are related to cache functionality and to the unlink() function specifically, which is trying to delete cache files, but isn’t able to find them and is throwing a lot of warnings, for example:
    [03-Feb-2022 13:28:04 UTC] PHP Warning: unlink(/dom21465/wp-content/uploads/wpdiscuz/cache/comments/341009/extra//437b7b3c3b2b8e847daca304c324a3b3_0): No such file or directory in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzCache.php on line 128
    [03-Feb-2022 14:08:08 UTC] PHP Warning: filemtime(): stat failed for /dom21465/wp-content/uploads/wpdiscuz/cache/users/ea0d1ef42e2a40a28b7398a78f1c9112 in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzCache.php on line 120
    [04-Feb-2022 01:35:03 UTC] PHP Warning: unlink(/dom21465/wp-content/uploads/wpdiscuz/cache/comments/92431/extra//437b7b3c3b2b8e847daca304c324a3b3_0): No such file or directory in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzCache.php on line 128
    [04-Feb-2022 01:54:16 UTC] PHP Warning: unlink(/dom21465/wp-content/uploads/wpdiscuz/cache/users/8ed98bc60d66c37c55ae5791d84bb576): No such file or directory in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzCache.php on line 128

    We waited and hoped that these warnings would disappear in one of the latest versions of the plugin, but unfortunately, we still see them in the error log file.

    Could you please take a look and share your thoughts? Also, is it possible for you to add if statement to check if the file exists first before trying to unlink it?

    Thanks!
    Vladislav Abrashev

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support gVectors Support

    (@gvectorssupport)

    Hi Vladislav Abrashev,

    Thank you for letting us know. We’ll check and get back to you ASAP.

    Thread Starter Vladislav Abrashev

    (@vabrashev)

    Hi again @gvectorssupport ,
    thanks for fixing the issue with the unlink() function in the last update. There are no more errors flooding the log file.

    Unfortunately, the issue with the filemtime() function isn’t fixed yet and we still get warnings several times a day. Attaching some data from the error log file:

    [06-Mar-2022 06:07:15 UTC] PHP Warning:  filemtime(): stat failed for /dom21465/wp-content/uploads/wpdiscuz/cache/users/808b3bf807e8dd8129fd90e3c8028bf2 in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzCache.php on line 118
    [06-Mar-2022 14:29:31 UTC] PHP Warning:  filemtime(): stat failed for /dom21465/wp-content/uploads/wpdiscuz/cache/comments/402707/437b7b3c3b2b8e847daca304c324a3b3_0 in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzCache.php on line 118
    [06-Mar-2022 18:31:11 UTC] PHP Warning:  filemtime(): stat failed for /dom21465/wp-content/uploads/wpdiscuz/cache/users/c9112ad129bc1863de9d5886716947f2 in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzCache.php on line 118
    [06-Mar-2022 21:29:24 UTC] PHP Warning:  filemtime(): stat failed for /dom21465/wp-content/uploads/wpdiscuz/cache/comments/517509/extra//437b7b3c3b2b8e847daca304c324a3b3_0 in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzCache.php on line 118
    [07-Mar-2022 10:15:56 UTC] PHP Warning:  filemtime(): stat failed for /dom21465/wp-content/uploads/wpdiscuz/cache/comments/120859/extra//437b7b3c3b2b8e847daca304c324a3b3_0 in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzCache.php on line 118

    Looking forward to your reply!

    -Vladislav

    Plugin Support gVectors Support

    (@gvectorssupport)

    Dear Vladislav,

    This will de fixed in the next update.

    Thread Starter Vladislav Abrashev

    (@vabrashev)

    Hi @gvectorssupport ,
    I believe we can mark this ticket as resolved now.

    We have noticed other minor warnings and errors, but we will open another ticket when we have more data collected.

    Thank you and all the best!

    -Vladislav

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP Warnings: unlink() cache files’ is closed to new replies.