ID:               29451
 Updated by:       [EMAIL PROTECTED]
 Reported By:      robert at rw-it dot net
-Status:           Open
+Status:           Wont fix
 Bug Type:         Apache related
 Operating System: Linux
 PHP Version:      Irrelevant
 New Comment:

The problem is that normal (module) PHP build only involves 
Apache headers which do not appear to provide this 
information. Consequently PHP cannot perform the check you 
have mentioned. 


Previous Comments:
------------------------------------------------------------------------

[2004-07-30 01:36:07] robert at rw-it dot net

Description:
------------
With some combinations of mod_php and Apache, getlastmod() returns the
access time instead of the modification time.

All bug reports that deal with this seem to have been closed with
"Works in CVS" or "Apache problem", both of which are not true.

The Problem occurs if Apache was built with large file size (64-bit)
support and mod_php wasn't, so they are essentially using different
stat(2) structures. If 64-bit file offsets are used, the st_blocks
member of struct stat grows to 64 bits and pushes the time members 32
bits "upwards". If you access this structure as a 32-bit stat structure
from mod_php, st_atime contains garbage, st_mtime the access time and
st_ctime the modification time of the 64-bit structure (voila!).

The easy solution is to #define _FILE_OFFSET_BITS to 64, if Apache does
(did) this.
The hard part is that I don't know how to figure out if Apache uses 32
or 64 bits after it is installed.
Secondly, PHP itself would have to use 64-bit stat structures, and I
don't know if this might lead to more problems.
So maybe it's better to transform the stat structure in mod_php?

Any ideas?




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29451&edit=1

Reply via email to