#27792 [Com]: Functions fail on large files (filesize,is_file,is_dir)
| From: | php at chairbreaker dot com | Date: | Sat, 03 Sep 2005 14:16:41 +0000 |
| Subject: | #27792 [Com]: Functions fail on large files (filesize,is_file,is_dir) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84481@lists.php.net to get a copy of this message | ||
ID: 27792
Comment by: php at chairbreaker dot com
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:
Same problem on SuSE Linux 9.3 using mod_php with Apache 2.0.53. PHP
version is 4.3.10, Kernel 2.6.11.4-21.8-default. File system is ext3.
PHP issues "Warning: is_dir(): Stat failed for <server path to file>
(errno=75 - Value too large for defined data type) in <path to
script>.php on line nnn" any time a file larger than 2 GB is
encountered, which unfortunately breaks my php menu system.
PHP is a great tool - hope you can fix this soon!
Previous Comments:
------------------------------------------------------------------------
[2005-08-11 16:06:00] wez@php.net
Well, looks like it will be fixed in 6.x instead.
------------------------------------------------------------------------
[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] wez@php.net
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=27792&edit=1