Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 62570

Summary: mod_php and apache - getlastmod()
Product: Gentoo Linux Reporter: Robert Wruck <robert>
Component: New packagesAssignee: Apache Team - Bugzilla Reports <apache-bugs>
Status: RESOLVED TEST-REQUEST    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Robert Wruck 2004-09-01 17:22:31 UTC
The apache ebuild (I currently use php-4.3.6 on apache-1.3.27, but later versions seem to be affected, too) sets -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 in the CFLAGS.
However, the ebuild for mod_php does not, resulting in apache and mod_php having different notions of the stat structure.
This causes getlastmod() to return the access time instead of the modification time -- see http://bugs.php.net/bug.php?id=29451 (getlastmod uses the stat structure provided by apache)

Fix: Use at least -D_FILE_OFFSET_BITS=64 for mod_php

Reproducible: Always
Steps to Reproduce:
1. Compile apache with -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
2. Compile mod_php without
3. Call getlastmod()

Actual Results:  
Prints file access time

Expected Results:  
Print file modification time
Comment 1 Benedikt Böhm (RETIRED) gentoo-dev 2005-01-28 10:01:24 UTC
i think trapni fixed LFS in apache and mod_php, could you please try currently hard masked apache and mod_php ebuilds which use the new eclasses

see http://dev.gentoo.org/~vericgar/package-refresh.txt