php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20885 Lastmodified header field not returned
Submitted: 2002-12-08 09:47 UTC Modified: 2002-12-09 05:09 UTC
From: bil_hays at unc dot edu Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.2.1 OS: Sun
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bil_hays at unc dot edu
New email:
PHP Version: OS:

 

 [2002-12-08 09:47 UTC] bil_hays at unc dot edu
It looks like to me that 4.2.1 with apache is not sending 
an appropriate lastmodified header, and this is mucking up 
javascripts that use document.lastModified. 

Here's a packet return from php (which lacks the 
lastmodified header):
<http://wwwx.cs.unc.edu/~hays/dev/javascript/
php_packet.txt>

And here's one through the same server not through php:
<http://wwwx.cs.unc.edu/~hays/dev/javascript/
non_php_packet.txt>

For an example of the problems this creates, if you look 
at:
<http://wwwx.cs.unc.edu/~hays/dev/javascript/
lastmodified.php> 
with IE, the current date is displayed, rather than the 
lastmodified date (from what I gather from the Mozilla bug 
list, IE will turn to the date field if last modified is 
not present). 

With IE:
<http://wwwx.cs.unc.edu/~hays/dev/javascript/
lastmodified.html>
shows a correct date.

In mozilla, lastmodified defaults to Jan 1 1970 if there's 
no lastmodified field, so it's also broken there.

For info on our server:
<http://wwwx.cs.unc.edu/~hays/dev/php/php_info.php>

thanks for such a good product!
bil



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-08 10:22 UTC] sniper@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
 [2002-12-09 05:09 UTC] hholzgra@php.net
it is up to your application to set this using
the php header() function, as usualy the content
produced by your script does not only change
on changes of the script itself

just returning the modification timestamp
of the php sourcefile doesn't make any
sense here ...

and regarding your javascript code:
afair a HTTP server does not *have to*
send a last-modified header so a client
*should not* rely on it being set?
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Sep 16 07:00:02 2025 UTC