php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8405 header() doesn't seem to have effect
Submitted: 2000-12-24 11:55 UTC Modified: 2001-03-09 21:29 UTC
From: sivasubraj at lycosmail dot com Assigned:
Status: Closed Package: Apache related
PHP Version: 4.0.3pl1 OS: Linux Mandrake 7.2
Private report: No CVE-ID: None
 [2000-12-24 11:55 UTC] sivasubraj at lycosmail dot com
When I do :

$date_expire = gmdate("D, d M Y H:i:s", (time() + 60*60*24*2))  . " GMT";
header ("Expires: " . $date_expire ); 
           //the client-browser SHOULD CACHE IT!
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); 

I always get as following:
[siva@localhost siva]$ curl -I http://localhost.localdomain/utqa4/utqa.php
HTTP/1.1 200 OK
Date: Sun, 24 Dec 2000 16:45:32 GMT
Server: Apache-AdvancedExtranetServer/1.3.14 (Linux-Mandrake/2mdk) PHP/4.0.3pl1
X-Powered-By: PHP/4.0.3pl1
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Last-Modified: Sun, 24 Dec 2000 16:45:32 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: PHPSESSID=1f4ffbfbd2118f0f1c827a4c4adea8ae; path=/
Connection: close
Content-Type: text/html      


Note that 
1) the HTTP header Cache-Control specifies no-cache, contrariwise to what I specified in the header() function. 
2) Last-Modified header too is wrong
Is it buggy? What should I do?

APACHE ver 1.3.14
PHP version 4.0.3pl1
 './configure' '--enable-trans-sid' '--with-pgsql' '--with-apxs' '--with-mycrypt

==========
Thanks, happy parties!
Siva

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-28 09:04 UTC] sniper@php.net
1. Upgrade to php4.0.4
2. Check your php.ini as it seems you have
enabled the session.auto_start, in which case
you might want to use something else than 'nocache' in session.cache_limiter directive.

--Jani
 [2001-03-09 21:29 UTC] sniper@php.net
No feedback.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 11:01:28 2024 UTC