#27792 [Asn]: Functions fail on large files (filesize,is_file,is_dir)

2007-10-14 Thread wez
 ID:   27792
 Updated by:   [EMAIL PROTECTED]
 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:

You might like to try the following patch:

http://news.php.net/php.internals/32767


Previous Comments:


[2007-08-17 09:36:22] aames at lycos dot de

Hello,

Using 
--
if($file != '.'  $file != '..'  filetype($folderpath . '/' . $file)
== 'file'  substr($file,0,1) != '.'){
   $fileid = fileid($folderpath,$file);
   $files[$file] = array($fileid,'exist');
 }
--
To determine if a given filename is a file.

filetype() results in the already mentioned Errors for a file with 3.5
GB -- even on PHP Version 5.2.1



[2007-04-11 21:38:48] robertmcol at gmail dot com

Hi,
My OS information is
PHP Version 5.1.6
Apache/2.2.2 (Fedora)
Fedora Core 5 Kernel 2.6.20-1.2307.fc5


Is the issue with large files resolved ?
If not are there any expectations as to when it may get resolved ?

I have been trying to sort a problem displaying large files and dates 
and have been getting invalid results.



[2006-12-27 20:36:37] bond00 at byu dot edu

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!



[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)).



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=27792edit=1


#27792 [Asn]: Functions fail on large files (filesize,is_file,is_dir)

2005-08-11 Thread wez
 ID:   27792
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kode at kodekrash dot com
 Status:   Assigned
 Bug Type: Filesystem function related
 Operating System: * (LFS)
 PHP Version:  5.1*
 Assigned To:  wez
 New Comment:

Well, looks like it will be fixed in 6.x instead.


Previous Comments:


[2005-07-01 12:04:08] no at spam dot net

is_link also fails on large files 2GB



[2005-06-30 06:40:29] dan at baximus dot com

Gee I hope it's included in PHP 5.1. IMHO this is a pretty 
important feature to have. But then, not everyone is in the 
business of serving up such large files from a PHP-driven 
website.



[2004-03-31 07:14:18] [EMAIL PROTECTED]

PHP does not currently support LFS.
This is something to be addressed in PHP 5.1



[2004-03-31 03:27:56] kode at kodekrash dot com

Description:

Error:
 (errno=75 - Value too large for defined data type)

Functions:
 is_file
 is_dir
 filesize

Premise:
 size of file is greater than 2GB.

--

I have been able to reproduce this error on 4 different PHP
installations (all on RedHat 7.3 machines), using 12 different files
for each test.

--

This bug has been submitted before, but is marked as BOGUS, which it is
certainly not.

Reproduce code:
---
filesize( $fname );
or
is_file( $fname )
or
is_dir( $fname )

where filesize( $fname )  2GB

Expected result:

Function: filesize
Expected: numeric value matching size of file

Function: is_file
Expected: boolean value

Function: is_dir
Expected: boolean value

Actual result:
--
(errno=75 - Value too large for defined data type)





-- 
Edit this bug report at http://bugs.php.net/?id=27792edit=1


#27792 [Asn]: Functions fail on large files (filesize,is_file,is_dir)

2004-10-19 Thread edink
 ID:   27792
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kode at kodekrash dot com
 Status:   Assigned
 Bug Type: Filesystem function related
 Operating System: * (LFS)
 PHP Version:  5CVS-2004-04-07
 Assigned To:  wez
 New Comment:

Compile PHP with:

CFLAGS=`getconf LFS_CFLAGS` ./configure (your configure options
here)

and it should work.


Previous Comments:


[2004-09-14 16:54:34] yapning at yahoo dot com

Is there any chance for the LFS feature be implemented on the
Filesystem functions soon?



[2004-03-31 07:14:18] [EMAIL PROTECTED]

PHP does not currently support LFS.
This is something to be addressed in PHP 5.1



[2004-03-31 03:27:56] kode at kodekrash dot com

Description:

Error:
 (errno=75 - Value too large for defined data type)

Functions:
 is_file
 is_dir
 filesize

Premise:
 size of file is greater than 2GB.

--

I have been able to reproduce this error on 4 different PHP
installations (all on RedHat 7.3 machines), using 12 different files
for each test.

--

This bug has been submitted before, but is marked as BOGUS, which it is
certainly not.

Reproduce code:
---
filesize( $fname );
or
is_file( $fname )
or
is_dir( $fname )

where filesize( $fname )  2GB

Expected result:

Function: filesize
Expected: numeric value matching size of file

Function: is_file
Expected: boolean value

Function: is_dir
Expected: boolean value

Actual result:
--
(errno=75 - Value too large for defined data type)





-- 
Edit this bug report at http://bugs.php.net/?id=27792edit=1