|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-04-06 12:49 UTC] s dot tabacchiera at gruppocsf dot com
Description:
------------
Hi, as stated in the summary the directive ini_set('last_modified', 1) in my scripts doesn't work.
In facts, I don't see any Last-Modified header in the Apache response.
Any clue?
Reproduce code:
---------------
foo.php:
<?
ini_set("last_modified", 1);
echo "Hello world!\n";
?>
# wget -S http://localhost/foo.php
Resolving localhost... 127.0.0.1
Connecting to localhost[127.0.0.1]:80... connected.
HTTP request sent, waiting for response...
1 HTTP/1.1 200 OK
2 Date: Wed, 06 Apr 2005 10:28:34 GMT
3 Server: Apache/1.3.33 (Unix) mod_ssl/2.8.22 OpenSSL/0.9.6b PHP/4.3.11 mod_auth_pgsql/0.9.12
4 X-Powered-By: PHP/4.3.11
5 Set-Cookie: ZDEDebuggerPresent=php,phtml,php3
6 Connection: close
7 Content-Type: text/html
Expected result:
----------------
...
. Last-Modified: ...blablabla...
...
Actual result:
--------------
no 'Last-Modified' header
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 15:00:01 2025 UTC |
last_modified is a SAPI-level ini setting which is checked and acted upon from the individual SAPI modules prior to PHP getting control. I don't see this changing, especially since the workaround is trivial. $mod = gmdate("D, d M Y H:i:s ",getlastmod())."GMT"; header("Last-Modified: $mod");