From: mail dot pourri at laposte dot net Operating system: All PHP version: 5.3.0 PHP Bug Type: Feature/Change Request Bug description: [PATCH] Add support for 64bits file handling on 32 bits architecture
Description: ------------ As currently all integers are 32 bits on 32 bits processor, even when php is compiled with Large File Support, all the functions that use integer instead of a right format (stat, filesize, ftell, etc...) don't report the right size when a file is > 4GB. The attached patch solve the issue by using doubles instead of int when a size overflow 32 bits (so as IEEE754 specifies, we have 53 bits of real, integer, value in a double). Unlike Wes patch posted earlier, that didn't work, I've modified all the code that still used size_t to use off_t, modifying the extensions too, memory mapping (that had a bug as it previously failed when offset used, BTW), etc... It works when applyied to released 5.3.0 with patch -p1. -- Edit bug report at http://bugs.php.net/?id=48886&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48886&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48886&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48886&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48886&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48886&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48886&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48886&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48886&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48886&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48886&r=support Expected behavior: http://bugs.php.net/fix.php?id=48886&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48886&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48886&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48886&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48886&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48886&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48886&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48886&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48886&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48886&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48886&r=mysqlcfg