PHP Warnings: unlink() cache files
-
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 128We 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
- The topic ‘PHP Warnings: unlink() cache files’ is closed to new replies.