php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32605 ini_set('last_modified', 1) doesn't work
Submitted: 2005-04-06 12:49 UTC Modified: 2005-04-06 17:47 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: s dot tabacchiera at gruppocsf dot com Assigned:
Status: Wont fix Package: Apache related
PHP Version: 4.3.11 OS: RedHat Linux 8.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: s dot tabacchiera at gruppocsf dot com
New email:
PHP Version: OS:

 

 [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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-06 13:47 UTC] sniper@php.net
Does it work if you change the option in php.ini?


 [2005-04-06 14:25 UTC] s dot tabacchiera at gruppocsf dot com
Yes, it works!
....
Last-Modified: Mon, 22 May 2000 21:45:00 GMT
....
 [2005-04-06 17:47 UTC] rasmus@php.net
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");
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 09:01:27 2024 UTC