note 11690 added to session_cache_limiter

From: Date: Fri, 02 Mar 2001 15:49:50 +0000
Subject: note 11690 added to session_cache_limiter
Groups: php.notes 
Request: Send a blank email to php-notes+get-11778@lists.php.net to get a copy of this message
There is a bug(?) in Internet Explorer v5.5 to do with file downloads over a secure (https) web connection when using sessions. If you have a php script which delivers files for downloading by setting headers for the content-type etc. from a URL like this: getfile.php/filename.ext - or - getfile.php?file=/filename.ext and that script uses sessions, then you must explicitly set session_cache_limiter('public'); *before* you use session_start(); otherwise you will get one of the following errors from IE when it attmpts to download the file: Internet Explorer cannot download filename.ext from name.of.your.webserver Internet Explorer was not able to open this site. The requested site is either unavailable or cannot be found. Please try again later. Mmm, this is useful error message isn't it! The other error you will see when right clicking and choosing 'Save Target As...' gives the error Internet Explorer cannot download filename.ext from name.of.your.webserver The file could not be written to the cache. This problem does not occur over unsecure (http) links and files download OK. I don't know why this should be the case, but PHP seems to send an extra no-cache header when using sessions which breaks IE when it is using SSL. Setting the session_cache_limiter turns off this behaviour. http://www.php.net/manual/en/function.session-cache-limiter.php

« previous php.notes (#11778) next »