| Bug #27792 | [PATCH] Functions fail on large files (filesize,is_file,is_dir,readdir) | ||||
|---|---|---|---|---|---|
| Submitted: | 31 Mar 2004 3:27am UTC | Modified: | 14 Sep 8:59am UTC | ||
| From: | kode at kodekrash dot com | Assigned to: | |||
| Status: | Critical | Category: | Filesystem function related | ||
| Version: | 5.*, 6CVS (2009-04-30) | OS: | * (LFS) | ||
| Votes: | 230 | Avg. Score: | 4.4 ± 1.0 | Reproduced: | 198 of 204 (97.1%) |
| Same Version: | 65 (32.8%) | Same OS: | 95 (48.0%) | ||
[31 Mar 2004 3:27am UTC] kode at kodekrash dot com
[31 Mar 2004 7:14am UTC] wez@php.net
PHP does not currently support LFS. This is something to be addressed in PHP 5.1
[11 Aug 2005 4:06pm UTC] wez@php.net
Well, looks like it will be fixed in 6.x instead.
[24 Oct 2005 9:16pm UTC] hendersj at mindspring dot com
I have seen problems related to this both over NFS and using a local NSS filesystem with Novell Open Enterprise Server (Linux kernel, SLES 9 is where the package orginates). The problem I have seen is more accurately described in bug 33872, which was flagged as a duplicate of this bug. Bug 33872 describes a condition where readdir() returns only the entries "." and ".." (in my case just "." is returned) regardless of the permissions to the directory. The same code run against a reiserFS partition works just fine. I am running php 4.3.4; I have also seen it with PHP 4.2.2 when using an NFS server that has 64-bit cookie values.
[14 Oct 2007 10:17pm UTC] wez@php.net
You might like to try the following patch: http://news.php.net/php.internals/32767
[5 Dec 2008 5:28pm UTC] aklmnop at gmail dot com
I had to change a couple more LVAL's to DVAL and RETURN_LONG to RETURN_DOUBLE after using the above patch, to make fseek(), fread(), ftell() and fwrite() work in PHP 5.2.4. This stuff is way too broken. Shamefully broken!
[30 Apr 7:45pm UTC] jani@php.net
See also bug #48099 (NFS mounts misbehave also without the compile flags..)
[30 Apr 7:45pm UTC] jani@php.net
And bug #45040
[11 Jul 1:40pm UTC] mail dot pourri at laposte dot net
Please see fix in http://bugs.php.net/bug.php?id=48886
[14 Sep 8:59am UTC] jani@php.net
The latest patch for this: http://www.php.net/~wez/lfs.diff
[12 Nov 10:27am UTC] boite dot pour dot spam at gmail dot com
The patch from Wez doesn't work, as it assumes size_t are 64 bits, which is not the case, even when LFS is defined. The patch from Mail Pourri works on 5.3.0 (I haven't tested in 5.3.1)
