Edit report at http://bugs.php.net/bug.php?id=51380&edit=1
ID: 51380 Comment by: jatubio at gmail dot com Reported by: jatubio at gmail dot com Summary: The function returns one byte less Status: Feedback Type: Bug Package: Filesystem function related Operating System: Windows 2003 Server (IIS 6.0) PHP Version: 5.3.2 New Comment: I have checked now and I apologize because the problem was in my code and not in function. I'm sorry, I'll try better next time around before writing a bug. Sorry again. Previous Comments: ------------------------------------------------------------------------ [2010-03-24 13:37:39] [email protected] Can't reproduce it. Tested on 1000 files in various paths and filesystems. And it is pretty obvious as we only return the value given by the windows API. What do you use for this "bytes returned", which may not be the actual file size. ------------------------------------------------------------------------ [2010-03-24 13:11:41] jatubio at gmail dot com Description: ------------ The function returns one byte less than file size. For example, a file with a size of 4,268,766 bytes, 4,268,765 bytes returned. Data: System Windows NT 5.2 build 3790 (Windows Server 2003 Standard Edition Service Pack 2) i586 Build Date Mar 3 2010 20:44:33 Compiler MSVC9 (Visual C++ 2008) Architecture x86 Server API CGI/FastCGI Test script: --------------- $file_size = filesize($path); // returns one byte less. $file_size = filesize($path)+1; // I need to do this!! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51380&edit=1
