note 14957 deleted from function.header by jimw
| From: | jimw@php.net | Date: | Wed, 31 Oct 2001 22:09:39 +0000 |
| Subject: | note 14957 deleted from function.header by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-19813@lists.php.net to get a copy of this message | ||
Hi there,
this is for everyone having problems with downloading files with IE5.x and SSL while using sessions
!!!!!!!
You don't have to use 'session_cache_limiter('public');' before
session_start() !!!
I had problems using it 'cause I would have ruined my session which is needed to create the
file which was intended for download.
Instead of this, I use following headers:
header("Content-Type: WHATEVER_YOU_LIKE");
header("Content-Disposition: inline; filename=\"excel.xls\"");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Pragma: public");
The last header is the most important, cause the header "Pragma: nocache"
generated by PHP after calling session_start() is the main problem when using IE and SSL.
The "Pragma: nocache" is only recognized by IE5.x and ONLY used if connection is made over
SSL.
Setting it to (not existing) "Pragma: public" overwrites the PHP-generated header, and
everything works fine.