PHP Warning: filesize() .. stat failed for C:\output\1024364.jpg Why does this happen on windows 2008 IIS server + php 5?
Posted on 2011-09-21
Why does this happen on windows 2008 IIS server + php 5?
This is the exact error I get;
[21-Sep-2011 11:32:01] PHP Warning: filesize() [<a href='function.filesize'>function.filesize</a>]: stat failed for C:\output\1024364.jpg
Before I move the file from the tmp directory, I check its filesize there succesfully, so the function is working.
And I can read the jpg and delete it in the same script, so permissions should be enough to stat it.
Its really confusing me! Thank you
1) What my script does is, it checks the filesize in the tmp directory and save it in $filesize
2) Then I move the file to c:\output directory
3) Compare filesize() with $filesize
4) read the jpg and delete it afterwards.
Everything works except step 3.