From: mf22cs at student dot hik dot se Operating system: WinXP Pro and Linux/Slack 2.4.18 PHP version: 4.3.2 PHP Bug Type: Date/time related Bug description: filemtime(string) and getlastmod() works very strange...
Description: ------------ getlastmod() gives the correct result on my localhost (which is at WinXP running IIS 5.1 with PHP4.3.2). But on the Linux webserver (running Apache 1.3.27 and PHP4.3.1) it gives a totally wrond result (that seems to be the last accesstime). Then I tried the filemtime(string) instead, but then my localhost got all crazy. It showed the birthdate of UNIX instead. Reproduce code: --------------- GLM: <?php echo date("d-m-Y H:i:s",getlastmod()); ?> <br/>FMT: <?php echo date("d-m-Y H:i:s",filemtime(trim($_SERVER["SCRIPT_FILENAME"]))); ?> Expected result: ---------------- GLM: 17-06-2003 01:20:55 FMT: 17-06-2003 01:20:55 at both systems (if that is the correct date/time of modification). Actual result: -------------- At the server this gives the following result: GLM: 17-06-2003 01:11:35 FMT:17-06-2003 01:18:23 And at local host: GLM: 17-06-2003 01:18:21 FMT:01-01-1970 01:00:00 -- Edit bug report at http://bugs.php.net/?id=24213&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24213&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24213&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24213&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24213&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24213&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24213&r=support Expected behavior: http://bugs.php.net/fix.php?id=24213&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24213&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24213&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24213&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24213&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24213&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24213&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24213&r=gnused