#19768 [Opn->Bgs]: Expires header incorrectly set, cannot be overwritten

From: Date: Sun, 20 Oct 2002 18:04:06 +0000
Subject: #19768 [Opn->Bgs]: Expires header incorrectly set, cannot be overwritten
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-22888@lists.php.net to get a copy of this message
ID: 19768 Updated by: sas@php.net Reported By: php@savignano.de -Status: Open +Status: Bogus Bug Type: Session related Operating System: Win32, Unix PHP Version: 4.2.1 New Comment: The default value 'nocache' means that the page should not be cached at all. Have a look at php.ini-dist, you probably want to set session.cache_limiter to 'private'. Previous Comments: ------------------------------------------------------------------------ [2002-10-05 11:50:34] php@savignano.de session_cache_control('none') was meant to read session_cache_limiter('none'). Sorry. ------------------------------------------------------------------------ [2002-10-05 11:46:47] php@savignano.de When using sessions, the Expires header is set to a date in the past (1981) instead of being correctly calculated from the current date plus the session expire time. This leads to re-loading of the resource instead of using cached data in browsers that obey the Expires header and/or use HTTP 1.0. Additionally, it is not possible to replace the Expires header using the header() function. Trying to do so results in the new correct date being appended after the old incorrect one (separated by a comma) which makes no sense. The only way to achieve correct Cache-Control and Expires headers is to switch off the automatic session headers by calling session_cache_control('none'), and then set all headers on one's own. However, this is only a work-around. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19768&edit=1

« previous php.bugs (#22888) next »