From: plamen at pulsator dot com Operating system: FreeBSD 6.2 i386 PHP version: 5.2.1 PHP Bug Type: Filesystem function related Bug description: fseek / ftell do not work correctly for files > 2GB
Description: ------------ fseek does not move the pointer over 2GB limit even if Large File Support is compiled according to the Filesystem functions instruction at the php manual (but if you want PHP to support LFS (large files) on Linux, then you need to have a recent glibc and you need compile PHP with the following compiler flags: -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64. ) Consecutive ftell() calls return 0 Reproduce code: --------------- $fp=fopen("Some Large File",'r'); fseek($fp,2147483648,SEEK_SET); echo ftell($fp); Expected result: ---------------- 2147483648 Actual result: -------------- 0 -- Edit bug report at http://bugs.php.net/?id=40726&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40726&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40726&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40726&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40726&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40726&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40726&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40726&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40726&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40726&r=support Expected behavior: http://bugs.php.net/fix.php?id=40726&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40726&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40726&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40726&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40726&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40726&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40726&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40726&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40726&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40726&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40726&r=mysqlcfg