Bug #16630 Updated: getlastmod() returns file access time, not modification time
| From: | matslin at orakel dot ntnu dot no | Date: | Sun, 05 May 2002 02:11:42 +0000 |
| Subject: | Bug #16630 Updated: getlastmod() returns file access time, not modification time | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-6931@lists.php.net to get a copy of this message | ||
ID: 16630
Updated by: matslin@orakel.ntnu.no
Reported By: johan@ekenberg.se
Status: Open
Bug Type: *Directory/Filesystem functions
Operating System: Linux, glibc 2.2.3
PHP Version: 4.1.2
New Comment:
I've been browsing around trying to look for a cause of this
behaviour... Currently its working like it should, both under Apache
1.3.24 / (current CVS head) (as module), under Apache 1.3.23 / (CVS
from 9. March) (compiled static). It does however seem broken in Apache
2.0.35 (probably since apache2filter doesnt provide path_translated in
the request_rec (or something, i'm not an apache2-expert or very used
to the php-source)).
Could you try compiling the current CVS and see if you're still
experiencing this problem? I did get the same results as you got
earlier (with 4.2.0 under Apache 2.0.35 (yes, i noticed you're running
1.3.23)), but after makeing and make installing the fresh version from
cvs, i now get just a 'false' instead.
I have the following test pages:
Apache 1.3.23/PHP CVS from march
http://home.e-mats.org/test-getlastmod.php
Apache 1.3.24/Current CVS HEAD
http://home.e-mats.org:809/test-getlastmod.php
Apache 2.0.35/Current CVS HEAD
http://home.e-mats.org:808/test-getlastmod.php
The source (which pretty much should be explained from the page:
http://home.e-mats.org/test-getlastmod.phps
One more thing, if you could just try to use filemtime() with the same
file, you would probably get the right results.
Previous Comments:
------------------------------------------------------------------------
[2002-04-16 05:39:36] johan@ekenberg.se
This is similar to http://bugs.php.net/bug.php?id=14837 which was
discarded with a "works in CVS". I'm not so sure it's solved that
easily.
Example page here:
http://www.ekenberg.se/php_getlastmod/getlastmod.php
The example shows the output from getlastmod() compared to "ls -l" and
"ls -lu". There's also a link to phpinfo().
The bug only appears when using PHP as an Apache module. When running
from the commandline the file modification time is shown correctly.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16630&edit=1