ID: 25557 Comment by: erland at lewin dot nu Reported By: rj at roos dot ws Status: Bogus Bug Type: Filesystem function related Operating System: linux 2.4.21 PHP Version: 4.3.3 New Comment:
THIS IS NOT BOGUS! This is a serious problem for me too. I'm writing some PVR software which uses files which can be >2GB. It upsets me that a PHP developer dismisses this without any explanation. The bug report was correct and well formulated. Of course it is a bug if stat won't return a proper file size for a file. The cause of this problam is that there is not a configure option to compile PHP with large file support. There should be a configure option like --enable-large-files, which defines the C constant _FILE_OFFSET_BITS=64. This will cause the file functions to work with large files (>2GB). Note that file offsets will have to be stored in an off_t type, and not an int (which may be only 32 bits). see for instance: http://www.linuxgazette.com/issue67/tag/13.html This is related to bug #15260 Previous Comments: ------------------------------------------------------------------------ [2003-09-16 09:51:40] [EMAIL PROTECTED] Really? Not bug. ------------------------------------------------------------------------ [2003-09-16 09:49:52] rj at roos dot ws Description: ------------ When using stat() on files > 2GB, the size overflows the 32 bit int. Reproduce code: --------------- stat("Any file > 2GB") Expected result: ---------------- return the filesize of the file > 2GB. Actual result: -------------- An error=75, value too large for the underlying data-structure and using is_file the message: file does not exist. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25557&edit=1
