Bug #51380 [Csd->Bgs]: The function returns one byte less

[email protected]
Newsgroups php.bugs
Message-ID <[email protected]>
Edit report at http://bugs.php.net/bug.php?id=51380&edit=1

 ID:               51380
 Updated by:       [email protected]
 Reported by:      jatubio at gmail dot com
 Summary:          The function returns one byte less
-Status:           Closed
+Status:           Bogus
 Type:             Bug
 Package:          Filesystem function related
 Operating System: Windows 2003 Server (IIS 6.0)
 PHP Version:      5.3.2



Previous Comments:
------------------------------------------------------------------------
[2010-03-24 14:35:13] jatubio at gmail dot com

I was one error in my code not in the function. I was one mistake, sorry

------------------------------------------------------------------------
[2010-03-24 14:34:00] jatubio at gmail dot com

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.

------------------------------------------------------------------------
[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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.