ID: 27792
Comment by: bond00 at byu dot edu
Reported By: kode at kodekrash dot com
Status: Assigned
Bug Type: Filesystem function related
Operating System: * (LFS)
PHP Version: 6CVS, *CVS
Assigned To: wez
New Comment:
I would love to know if this bug has indeed been fixed in 5.2. I tried
it in 5.2 and it didn't work, but someone mentioned that this could be
due to my 32 bit processor. Can anyone confirm this as well? Thanks!
Previous Comments:
------------------------------------------------------------------------
[2006-12-18 03:09:08] judas dot iscariote at gmail dot com
This seems to work in 5.2.0 file_exists is returning
correct information on large files..
I dunno why this wasnt metioned in the Changelog.. nor if
the included solution is complete or partial.. can any dev
confirm this ?
------------------------------------------------------------------------
[2006-12-05 18:49:33] eric dot gewirtz at solutiononecdi dot com
I was having issues with fopen() and files > 2g. This is now working
for me in 5.2.0-7. I also tested the filesize() function with 5.2.0-7
and it still has an issue because it returns an int and the file size >
2g blows but the error message is gone but it is clearly documented in
the online manual.
The following is from the manual;
Note: Because PHP's integer type is signed and many platforms use 32bit
integers, filesize() may return unexpected results for files which are
larger than 2GB. For files between 2GB and 4GB in size this can usually
be overcome by using sprintf("%u", filesize($file)).
------------------------------------------------------------------------
[2006-09-12 13:24:39] sorry at example dot com
function is_dir_LFS($path){
return (('d'==substr(exec("ls -dl '$path'"),0,1))?(true):(false));
}
------------------------------------------------------------------------
[2006-09-12 13:08:47] sorry at example dot com
A workaround for this is:
$filesize=exec("ls -l '$yourfile' | awk '{print $5}'");
------------------------------------------------------------------------
[2006-07-24 13:17:03] caluml at gmail dot com
Don't forget that PHP is not used exclusively on websites.
I use the CLI version for other uses, and this <2GB limit is starting
to make that rather awkward.
Getting the filesystem functions working with large files would be very
useful.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/27792
--
Edit this bug report at http://bugs.php.net/?id=27792&edit=1