Re: [PHP-DB] Excel headers not working anymore

2005-02-11 Thread Martin Norland
Perry, Matthew (Fire Marshal's Office) wrote:
Wow!
Removing the file that controlled the session array fixed the problem
(suggestion 2).
I was using ssl and session data and would never have guessed it would trip
things up.  I would have stared at this problem for weeks and probably not
have solved the problem.
Also I will change my code to include 
Thank you very much for your help.
- Matthew Perry
The following is what I use - it allows caching but forces it not to be 
cached (it's a report, so it's changing every time).  It's a little 
redundant, because these items are a little bit of a pain to follow.  I 
have these running before the session is set - you may only need the 
session_cache_limiter call, come to think, since I'm setting these 
before the session starts and the others likely get overwritten.


header('Cache-Control: private, must-revalidate');
header('Pragma: private'); // allow private caching
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // set to 
be modified 'now'
session_cache_limiter("private, must-revalidate"); // allow private 
caching, but cache MUST check output
// rest of script
?>

Cheers,
--
- Martin Norland, Sys Admin / Database / Web Developer, International 
Outreach x3257
The opinion(s) contained within this email do not necessarily represent 
those of St. Jude Children's Research Hospital.

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


RE: [PHP-DB] Excel headers not working anymore

2005-02-11 Thread Perry, Matthew (Fire Marshal's Office)
Wow!
Removing the file that controlled the session array fixed the problem
(suggestion 2).

I was using ssl and session data and would never have guessed it would trip
things up.  I would have stared at this problem for weeks and probably not
have solved the problem.

Also I will change my code to include mailto:[EMAIL PROTECTED] 
Sent: Friday, February 11, 2005 10:47 AM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Excel headers not working anymore

Perry, Matthew (Fire Marshal's Office) wrote:
> Good morning,
> 
> I have been using PHP4.1, Apache, and MySQL for a few years now and have
> never had a problem with my Excel headers.  When I want to output html to
> Excel I place the following on the top of the page:
> 
>  header ("Content-Disposition: attachment" );
> 
> After moving to PHP 4.3, MS SQL Server, Windows 2000 Server I am having
> problems with this header.  I get the message:
> "Internet Explorer cannot download myfile.php from myintranet.net"

1) is your server still configured to recognize "http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

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



Re: [PHP-DB] Excel headers not working anymore

2005-02-11 Thread Martin Norland
Perry, Matthew (Fire Marshal's Office) wrote:
Good morning,
I have been using PHP4.1, Apache, and MySQL for a few years now and have
never had a problem with my Excel headers.  When I want to output html to
Excel I place the following on the top of the page:

After moving to PHP 4.3, MS SQL Server, Windows 2000 Server I am having
problems with this header.  I get the message:
"Internet Explorer cannot download myfile.php from myintranet.net"
1) is your server still configured to recognize "
You could also try changing it to:

header("Content-disposition: attachment; filename=\"$filename\"");
to ensure that it's "going off" (set $filename obviously, something 
distinct like my_excel.xls)

2) Are you using ssl and sessions?  You'll find some fun and strange 
behavior trying to save output from an ssl connection and sessions - 
because sessions force no-cache, and (IE in particular) has real issues 
with storing the output of a no-cache'd https - you can't save it 
locally or open with an external application, because either way it has 
to store it somewhere other than memory, which would be caching.

Cheers,
--
- Martin Norland, Sys Admin / Database / Web Developer, International 
Outreach x3257
The opinion(s) contained within this email do not necessarily represent 
those of St. Jude Children's Research Hospital.

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