#16630 [Opn->Csd]: getlastmod() returns file access time, not modification time

From: Date: Thu, 15 Aug 2002 00:01:36 +0000
Subject: #16630 [Opn->Csd]: getlastmod() returns file access time, not modification time
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-16856@lists.php.net to get a copy of this message
ID: 16630 Updated by: iliaa@php.net Reported By: johan@ekenberg.se -Status: Open +Status: Closed Bug Type: Apache related Operating System: Linux, glibc 2.2.3 PHP Version: 4.1.2, 4.3.0-dev New Comment: Sorry, but the bug system is not the appropriate forum for asking support questions. Your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php Thank you for your interest in PHP. This works fine with Apache 1.3.20/1.3.26 & PHP 4.3.0-dev. If the bug does exist it is in the Apache code and not PHP. Previous Comments: ------------------------------------------------------------------------ [2002-06-30 18:57:25] chrisken@ncs.utexas.edu Running: Apache 2.0.39 PHP 4.2.1 ( as a DSO ) This is still a bug in getlastmod(), and I have created another small test case page to show this bug: http://www.utacm.org/extra/getlastmod.php ------------------------------------------------------------------------ [2002-06-18 04:51:26] derick@php.net It's an apache thing... as it works fine in CGI mode. ------------------------------------------------------------------------ [2002-06-11 18:34:56] jerry.zhao@vanderbilt.edu Different platform, same problem. Apache 1.3.24 PHP 4.1.2 Solaris 7 / Sun Sparc server gcc 2.95.2 ------------------------------------------------------------------------ [2002-05-09 08:27:52] johan@ekenberg.se I've built (statically) the latest snapshot (php4-200110220000 from snaps.php.net) with apache-1.3.24, and the results are exactly the same. Example here: http://www2.aname.net/~johan/getlastmod/getlastmod.php filemtime() works correctly as you suggest. ------------------------------------------------------------------------ [2002-05-04 22:11:41] matslin@orakel.ntnu.no 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. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/16630 -- Edit this bug report at http://bugs.php.net/?id=16630&edit=1

« previous php.bugs (#16856) next »