473,403 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

dumping data to excel via https and ie6 broken

I thought I would contribute a solution for once.

We have a standard SUSE LAMP (Linux Apache Mysql PHP) server running
some custom apps, of which one component is dumping reports out to
excel. We are running this with https and all was good for a few
months. IE6 and Firefox worked fine. One day around the end of July
2005, IE6 stops doing the excel part.. Excel errors out with a "Could
not open 'https://blah.com?report.php'" . Firefox continues to work
fine. It turns out something has changed in an IE update from
Microsoft that breaks the old method we employed to launch excel and
feed it the data stream. This php code below contains the new headers
which now make this work for us again. Firefox continues to work
flawlessly with the new headers also!

<?
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=report.xls");
header('Cache-Control: private, must-revalidate');
header('Pragma: private'); // allow private caching
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
session_cache_limiter("private, must-revalidate"); // allow private
?>

BTW, we are using PHP 4.x and apache 1.3.x

I hope this helps someone else, as it puzzled us for a while.

Aug 8 '05 #1
2 1760
JDS
On Mon, 08 Aug 2005 06:47:53 -0700, mr.kuhl wrote:
I hope this helps someone else, as it puzzled us for a while.


Thanks. I almost certainly will encounter this problem soon (and I didn't
know about it until now).

--
JDS | je*****@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

Aug 8 '05 #2
it's a known IE bug.
add these lines at the top of your php script:

session_cache_limiter('private');
$cache_limiter = session_cache_limiter();

Aug 8 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Greg Brant | last post by:
Hi, how can i backup a table / entire DB and get the index's as well as the data / create table's etc cheers Greg
3
by: cruiserweight | last post by:
i am trying to serve the exact same page from both http and https servers. i am using a linked stylesheet like this <link rel="stylesheet" href="../styles/main.css" type="text/css" /> the http...
3
by: Wade G. Pemberton | last post by:
Help!: I use javascript to format repetitive data from a web page input FORM into a long string , and save it as lines of comma delimited data in a text file on a Unix server. The text...
2
by: Peter | last post by:
I have a Query called "DATA" that contains 60 records with 6 fields of data. I want to dump the query results into a specific xls file. The first worksheet of this xls file has space for the...
1
by: logik3x | last post by:
I'm developping a program to automate the submisson of grades to a website called omnivox.ca (http://brebeuf.omnivox.ca). My problem is that I can't get the login working. I get the cookie right...
3
by: Yourself | last post by:
Hi, I'm trying to post data to PayPal for a shopping cart, basically I want to replicate a form like the following, but create the variables dynamically from code behind: <form...
4
by: Peter Afonin | last post by:
Hello, I have a form with several buttons, and I need to post this data to several different applications. In ASP.NET 1.1 it was quite easy - I just used HTML controls (text or hidden), then...
3
by: sagar | last post by:
Hi all, I want a python script which takes in input an EXCEL sheet and then reads the data in it. Any code snippets will be fine and this i want this in windows XP . Thanks in Advance Sagar...
3
by: maylee21 | last post by:
hi, anyone can help me figure out how to read data from a text file like this: 10980012907200228082002 and extract the data according to this kind of format: Record type 1 TY-RECORD ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.