467,894 Members | 1,760 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,894 developers. It's quick & easy.

Internet Explorer cannot download <filename> from www.domain.tld

http://www.frostjedi.com/terra/scrip.../download2.php

Whenever I get that page, I get the following error:

---------------------

Internet Explorer cannot download download2.php from www.frostjedi.com.

Internet Explorer was not able to open this Internet site. The
requested site is either unavailable or cannot be found. Please try
again later.

---------------------

Here's the source code to download2.php:

<?php
session_start();
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename="emails.csv"');
?>
a
b
....

If session_start() is commented out, it works just fine. I've
narrowed the problem to a particular header that's being transmitted.
Namely, this one:

header('Cache-Control: no-store, no-cache, must-revalidate, post-
check=0, pre-check=0');

If you replace session_start() with that, you'll get the same error.
The only thing is... I'm not sure why that header is being added. I
can fix it by adding header('Cache-control: private');, but I'd still
like to know why it's being added in the first place.

Any ideas?
Oct 29 '08 #1
  • viewed: 7145
Share:
1 Reply
yawnmoth wrote:
http://www.frostjedi.com/terra/scrip.../download2.php

Whenever I get that page, I get the following error:

---------------------

Internet Explorer cannot download download2.php from www.frostjedi.com.

Internet Explorer was not able to open this Internet site. The
requested site is either unavailable or cannot be found. Please try
again later.

---------------------

Here's the source code to download2.php:

<?php
session_start();
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename="emails.csv"');
?>
a
b
...

If session_start() is commented out, it works just fine. I've
narrowed the problem to a particular header that's being transmitted.
Namely, this one:

header('Cache-Control: no-store, no-cache, must-revalidate, post-
check=0, pre-check=0');

If you replace session_start() with that, you'll get the same error.
The only thing is... I'm not sure why that header is being added. I
can fix it by adding header('Cache-control: private');, but I'd still
like to know why it's being added in the first place.
Known problem: MSIE not storing it in cache, and hence nnot downloadable.
The cache headers are probably from your session_start() (look at your ini
session settings, cache control is one of them).
--
Rik
Oct 30 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jesper Hermansen | last post: by
3 posts views Thread by Wiktor Zychla | last post: by
2 posts views Thread by adios | last post: by
2 posts views Thread by Bill Roper | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.