Title: filemtime() [function.filemtime]: stat failed &amp; Cannot modify header info
Last modified: August 21, 2016

---

# filemtime() [function.filemtime]: stat failed & Cannot modify header info

 *  [dietrichmd](https://wordpress.org/support/users/dietrichmd/)
 * (@dietrichmd)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/filemtime-functionfilemtime-stat-failed-cannot-modify-header-info/)
 * Latest and greatest plugin and wordpress version. Uploads work fine, I even customized
   the form and everything passes.
 * Files upload ok, and in the directory I see several hash files that match the
   filesize of the uploads. I can rename them with a .jpg extension and I can see
   the uploaded file.
 * However, when I click the link received in the email after upload, I get the 
   following errors:
 *     ```
       Warning: filemtime() [function.filemtime]: stat failed for 20130410_175758_16.jpg in /home/dietrich/public_html/realcampsitephotos.com/wp-content/plugins/front-end-upload/front-end-upload.php on line 900
   
       Warning: Cannot modify header information - headers already sent by (output started at /home/dietrich/public_html/realcampsitephotos.com/wp-content/plugins/front-end-upload/front-end-upload.php:900) in /home/dietrich/public_html/realcampsitephotos.com/wp-content/plugins/front-end-upload/front-end-upload.php on line 900
   
       Warning: Cannot modify header information - headers already sent by (output started at /home/dietrich/public_html/realcampsitephotos.com/wp-content/plugins/front-end-upload/front-end-upload.php:900) in /home/dietrich/public_html/realcampsitephotos.com/wp-content/plugins/front-end-upload/front-end-upload.php on line 901
   
       Warning: Cannot modify header information - headers already sent by (output started at /home/dietrich/public_html/realcampsitephotos.com/wp-content/plugins/front-end-upload/front-end-upload.php:900) in /home/dietrich/public_html/realcampsitephotos.com/wp-content/plugins/front-end-upload/front-end-upload.php on line 902
   
       Warning: Cannot modify header information - headers already sent by (output started at /home/dietrich/public_html/realcampsitephotos.com/wp-content/plugins/front-end-upload/front-end-upload.php:900) in /home/dietrich/public_html/realcampsitephotos.com/wp-content/plugins/front-end-upload/front-end-upload.php on line 903
   
       Warning: Cannot modify header information - headers already sent by (output started at /home/dietrich/public_html/realcampsitephotos.com/wp-content/plugins/front-end-upload/front-end-upload.php:900) in /home/dietrich/public_html/realcampsitephotos.com/wp-content/plugins/front-end-upload/front-end-upload.php on line 904
   
       Warning: Cannot modify header information - headers already sent by (output started at /home/dietrich/public_html/realcampsitephotos.com/wp-content/plugins/front-end-upload/front-end-upload.php:900) in /home/dietrich/public_html/realcampsitephotos.com/wp-content/plugins/front-end-upload/front-end-upload.php on line 905
   
       Warning: Cannot modify header information - headers already sent by (output started at /home/dietrich/public_html/realcampsitephotos.com/wp-content/plugins/front-end-upload/front-end-upload.php:900) in /home/dietrich/public_html/realcampsitephotos.com/wp-content/plugins/front-end-upload/front-end-upload.php on line 906
       ```
   
 * Then what looks like the uploaded file in text format. I have posted a screenshot
   at [http://cdn.dietrichduke.com/rcp/rcpuploaderror.png](http://cdn.dietrichduke.com/rcp/rcpuploaderror.png)
 * Any ideas?
 * Thanks
 * [http://wordpress.org/extend/plugins/front-end-upload/](http://wordpress.org/extend/plugins/front-end-upload/)

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

 *  Thread Starter [dietrichmd](https://wordpress.org/support/users/dietrichmd/)
 * (@dietrichmd)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/filemtime-functionfilemtime-stat-failed-cannot-modify-header-info/#post-3652246)
 * deleted by author
 *  Thread Starter [dietrichmd](https://wordpress.org/support/users/dietrichmd/)
 * (@dietrichmd)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/filemtime-functionfilemtime-stat-failed-cannot-modify-header-info/#post-3652297)
 * Ok, I think this is resolved. I found a section in the code that actually puts
   this stuff in the database.
 * Also commented out the date line:
 * `// header ( 'Last-Modified: ' . gmdate ( 'D, d M Y H:i:s', filemtime ( $filename)).'
   GMT' );`
 * All seems to be well now. However, the last -modified thing is tripping me up…
   any ideas on why that would cause a header error?
 * THanks
 *  [Michaela Steidl](https://wordpress.org/support/users/buerosmart/)
 * (@buerosmart)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/filemtime-functionfilemtime-stat-failed-cannot-modify-header-info/#post-3652504)
 * I guess the problem is . gmdate (space between . + gmdate )
 * I changed the line to the following, and now everything works fine:
 * header ( ‘Last-Modified: ‘.gmdate(‘D, d M Y H:i:s’, $filetime).’ GMT’);

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

The topic ‘filemtime() [function.filemtime]: stat failed & Cannot modify header 
info’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/front-end-upload.svg)
 * [Front End Upload](https://wordpress.org/plugins/front-end-upload/)
 * [Support Threads](https://wordpress.org/support/plugin/front-end-upload/)
 * [Active Topics](https://wordpress.org/support/plugin/front-end-upload/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/front-end-upload/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/front-end-upload/reviews/)

## Tags

 * [headers already sent](https://wordpress.org/support/topic-tag/headers-already-sent/)

 * 3 replies
 * 2 participants
 * Last reply from: [Michaela Steidl](https://wordpress.org/support/users/buerosmart/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/filemtime-functionfilemtime-stat-failed-cannot-modify-header-info/#post-3652504)
 * Status: not resolved