Title: PHP Warnings: stat(), unlink(), chmod()
Last modified: June 12, 2017

---

# PHP Warnings: stat(), unlink(), chmod()

 *  [Howdy_McGee](https://wordpress.org/support/users/howdy_mcgee/)
 * (@howdy_mcgee)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/php-warnings-stat-unlink-chmod/)
 * I’m not sure what is the root cause of the issue, WordPress 4.8 or Contact Form
   7 v4.8 but 4.8 or maybe our update to PHP7 but I’ve been randomly getting the
   following string of errors:
 *     ```
       PHP Warning:  stat(): stat failed for /wp-content/uploads/wpcf7_captcha/1016550241.txt in /wp-content/plugins/really-simple-captcha/really-simple-captcha.php on line 257
       PHP Warning:  unlink(/wp-content/uploads/wpcf7_captcha/1016550241.txt): No such file or directory in /wp-content/plugins/really-simple-captcha/really-simple-captcha.php on line 260
       PHP Warning:  chmod(): No such file or directory in /wp-content/plugins/really-simple-captcha/really-simple-captcha.php on line 261
       PHP Warning:  unlink(/wp-content/uploads/wpcf7_captcha/1016550241.txt): No such file or directory in /wp-content/plugins/really-simple-captcha/really-simple-captcha.php on line 262
       ```
   
 * I’ve looked in FTP and the file certainly doesn’t exist, so it’s trying to unlink
   a file that’s just not there ( as far as I can tell ). I can’t consistently replicate
   the issue either which is bothersome. It does appear to affect many of my websites
   with different plugins / themes installed though.

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

 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/php-warnings-stat-unlink-chmod/#post-9222153)
 * Maybe it should do more reliable file existence checking there. I’ll add it into
   the next release.
 *  [zzzaaabbb](https://wordpress.org/support/users/finlanderid/)
 * (@finlanderid)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/php-warnings-stat-unlink-chmod/#post-9281026)
 * Thanks for your post, [@howdy_mcgee](https://wordpress.org/support/users/howdy_mcgee/).
   I am having the exact same problem.
 * It might be related to browser caching. When the Warnings are throwing on a page
   access or soft page refresh, if I do a CTRL+F5 (full/hard refresh), then the 
   Warnings do not throw. You can test browser-caching settings in the various places
   that it might be enabled, such as your caching plug-in or Cloudflare’s config.
 * function generate_image is what triggers the function cleanup (where these calls
   are made). That should only happen when a page with captcha is loaded, so I am
   confused about why the Warnings are throwing on blog post pages, and not on the
   Contact Form page, because I don’t have the captcha module installed on blog 
   post pages ..
 * Possibly unrelated, but in the past I have had similar trouble with Cloudflare’s
   Auto Minify feature. I am going to turn it off and wait and test.
 * Author: any clues here?
    -  This reply was modified 8 years, 10 months ago by [zzzaaabbb](https://wordpress.org/support/users/finlanderid/).
 *  [Anton42](https://wordpress.org/support/users/anton42/)
 * (@anton42)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/php-warnings-stat-unlink-chmod/#post-9338263)
 * Same warnings for me, shown on different pages, not consistently — ≈ 5–10% of
   time (still annoying). Warnings go away after reloading the page, no Ctrl-F5 (
   cache bypass) is needed. It happens on all pages, with or without ContactForm7,
   as @zzzaaabbb above says.
 * I hope this helps find and fix the issue.
 *  [Anton42](https://wordpress.org/support/users/anton42/)
 * (@anton42)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/php-warnings-stat-unlink-chmod/#post-9338280)
 * Ah, just found out that Really Simple Captcha is no longer recommended, switched
   to reCaptcha following [these instructions](https://contactform7.com/recaptcha/),
   thanks!

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

The topic ‘PHP Warnings: stat(), unlink(), chmod()’ is closed to new replies.

 * ![](https://ps.w.org/really-simple-captcha/assets/icon-256x256.png?rev=1047241)
 * [Really Simple CAPTCHA](https://wordpress.org/plugins/really-simple-captcha/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/really-simple-captcha/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/really-simple-captcha/)
 * [Active Topics](https://wordpress.org/support/plugin/really-simple-captcha/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/really-simple-captcha/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/really-simple-captcha/reviews/)

## Tags

 * [PHP Warning](https://wordpress.org/support/topic-tag/php-warning/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * 4 replies
 * 4 participants
 * Last reply from: [Anton42](https://wordpress.org/support/users/anton42/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/php-warnings-stat-unlink-chmod/#post-9338280)
 * Status: not resolved