From: Operating system: Windows 7 PHP version: 5.3.6 Package: Filesystem function related Bug Type: Feature/Change Request Bug description:fseek inconsistencies with large (>2GB) files
Description: ------------ Firstly, I'm aware that fseek/ftell doesn't necessarily work correctly with >2GB files with 32-bit PHP due to integer range constraints, however, fseek operates rather inconsistently when passing 2GB, which would be nice if fixed (note that I've put this as a feature request, as it's a nice to have, and unsure if you'd classify this as a bug). I'm using the 32-bit Windows build from here: http://windows.php.net/download/ See example script [ http://pastebin.com/Zb0vRgWX ] with comments for more info. I haven't looked at PHP's source code, but from the behaviour of the script, I'm guessing that fseek does some checks, and because it's overflowing, it won't allow certain operations. I'm not sure about the weird 8192 byte limit though. As fread allows overflows, would it be possible to allow fseek to overflow too? (PS first time I've submitted a "bug" - I hope I've done it correctly >_>) -- Edit bug report at http://bugs.php.net/bug.php?id=54902&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54902&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54902&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54902&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=54902&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54902&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=54902&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=54902&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=54902&r=needscript Try newer version: http://bugs.php.net/fix.php?id=54902&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=54902&r=support Expected behavior: http://bugs.php.net/fix.php?id=54902&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=54902&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=54902&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=54902&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54902&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=54902&r=dst IIS Stability: http://bugs.php.net/fix.php?id=54902&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=54902&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=54902&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=54902&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=54902&r=mysqlcfg