Is there a way to override the headers that session_start() sends to the
browser from within a PHP script? On php 4.0.4pl1 (will be upgrading to
4.1.1 later) on SOME browsers (notably, IE 6.0 on XP -- my setup), a script
I have that outputs a PDF document will misbehave in IE when the "No-store"
portion of a cache-control header is present... which PHP sends as part of
the sessions.

When this is present, IE6 will either come up with a blank page, or it'll
present your typical "You are downloading the file: blah blah blah... would
you like to open the file or save it to your computer?" dialog box. However,
the 'open' option of the dialog box will be grayed out, and clicking Save
yields an error message reading "Internet Explorer can notnot download
<location> from <host>. Internet explorer was not able to open this Internet
Site.  The requested site is either unavailable or cannot be found.  Please
try again later."

Like I said, it seems to be the "No-store" part of a cache-control header
that causes the problem. Change the caching options for sessions from
nocache to private fixes this, but happens to break other things on the
site. Sending my own cache-control headers with header() either merges them
with the ones the session_start sends, or does absolutely nothing (verified
by doing a GET /url HTTP/1.0 via telnet to port 80), regardless of whether
the header occurs before or after the session_start.

-- Daniel Grace

P.S. The PDF documents are generated using Wayne Munro's cpdf and cezpdf
classes, located at http://sourceforge.net/projects/pdf-php/.; They do not
require clibpdf or pdflib and are public-domain, so there are no licensing
fees involved...





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to