From:             david at giffin dot org
Operating system: Linux Debian
PHP version:      5.0.1
PHP Bug Type:     Apache related
Bug description:  file_exists() doesn't work with 2G+ files

Description:
------------
file_exists() doesn't work under apache with files that are >= 2 gig. The
script provided works using the cli version of php5 compilied on the same
system at the same time as the apache version.

Reproduce code:
---------------
<?php

print "<pre>";
$file = "/tmp/tester.file";
for ($i = 0; $i < 6; $i++) {
        @unlink($file);
        $cmd = "dd if=/dev/zero of=$file bs=1024 count=1024 seek={$i}M";
        echo $cmd . "\n";
        system($cmd);
        system("ls -lh $file");
        echo "File Exists: " . file_exists($file) . "\n";
        print "\n";
}
@unlink($file);
print "</pre>";

?>

Expected result:
----------------
file_exists should return true even though the file is >= 2 gig

Actual result:
--------------
file_exists returns false if >= 2 gig

-- 
Edit bug report at http://bugs.php.net/?id=32095&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32095&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32095&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32095&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32095&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32095&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32095&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32095&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32095&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32095&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32095&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32095&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32095&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32095&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32095&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32095&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32095&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32095&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32095&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32095&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32095&r=mysqlcfg

Reply via email to