By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,722 Members | 1,904 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,722 IT Pros & Developers. It's quick & easy.

Re: Download in IE and Firefox

P: n/a
I am top-posting this one time because this in new stuff and I am
leaving the bottom for reference and description of the problem. I am
also adding comp.lang.php as this is all done in php and there is a
remote possiblity that I have to do something else in php.

What is sent from php is as follows:

Headers (done with header calls):
Content-type: application/vnd.ms-excel
Content-Disposition: attachment; filename=foo.xls
Pragma: no-cache
Expires: 0

followed by:
<center><table border=1px><caption><h4>The Title</h4></caption>
<th>First Column</th><th>Second Column</th><th>Third Column</th>
<tr><td>1</td><td>2</td><td>3</td></tr>
<tr><td>4</td><td>5</td><td>6</td></tr></table>

These are sent via an echo statement in php.

I have a sample app www.sheldonlg.com/excel/excel.php

This sample app works fine in IE6, IE7, and FF. My problem is that on
the actual app, which is behind a firewall accessible only over VPN, I
get the errors listed in the original post (below) for IE6 and IE7. FF
is perfect.

Does anyone have any ideas on how to track down this bug? I am looking
for an approach. (A solution would be even better :-), but that is like
asking for the moon).
sheldonlg wrote:
I have an app where I create an Excel file. I am queried whether I want
to save it or open it. In FF this works perfectly for either saving or
opening the file. It does not work at all in Internet Explorer.

In IE6, I get
Choosing Save:
Internet Explorer cannot download ......stuff from the_url
Internet Explorer was not able to open this site. The requested site is
either unavailable or cannot be found. Please try again later.

Choosing Open:
Could not open https://the_url?the_parameters
clicking OK then says that it could not access this file and that there
were several reasons like file name or path does not exist; the file is
being used by another program; the workbook trying to save is the same
name as the currently open workbook.

In IE7 there is a different, immediate, failure without even getting to
the query for open or save. It says:
Internet Explorer cannot download the_generating_page from the_base_url.
Internet Explorer was not able to open this internet site. The
requested site is either unavailable or cannot be found. Please try
again later.

This works fine in Firefox. There is nothing open in Excel other than
this application trying to do its thing. Also, that script that it says
it cannot open does exist (obviously, since it works in FF).
Aug 13 '08 #1
Share this Question
Share on Google+
5 Replies


P: n/a

<sheldonlgwrote in message
news:B_******************************@giganews.com ...
>I am top-posting this one time because this in new stuff and I am leaving
the bottom for reference and description of the problem. I am also adding
comp.lang.php as this is all done in php and there is a remote possiblity
that I have to do something else in php.

What is sent from php is as follows:

Headers (done with header calls):
Content-type: application/vnd.ms-excel
Content-Disposition: attachment; filename=foo.xls
Pragma: no-cache
Expires: 0

followed by:
<center><table border=1px><caption><h4>The Title</h4></caption>
<th>First Column</th><th>Second Column</th><th>Third Column</th>
<tr><td>1</td><td>2</td><td>3</td></tr>
<tr><td>4</td><td>5</td><td>6</td></tr></table>

These are sent via an echo statement in php.

I have a sample app www.sheldonlg.com/excel/excel.php
I have put the php code up in www.sheldonlg.com/excel/excel.doc
>
This sample app works fine in IE6, IE7, and FF. My problem is that on the
actual app, which is behind a firewall accessible only over VPN, I get the
errors listed in the original post (below) for IE6 and IE7. FF is
perfect.

Does anyone have any ideas on how to track down this bug? I am looking
for an approach. (A solution would be even better :-), but that is like
asking for the moon).
sheldonlg wrote:
>I have an app where I create an Excel file. I am queried whether I want
to save it or open it. In FF this works perfectly for either saving or
opening the file. It does not work at all in Internet Explorer.

In IE6, I get
Choosing Save:
Internet Explorer cannot download ......stuff from the_url
Internet Explorer was not able to open this site. The requested site is
either unavailable or cannot be found. Please try again later.

Choosing Open:
Could not open https://the_url?the_parameters
clicking OK then says that it could not access this file and that there
were several reasons like file name or path does not exist; the file is
being used by another program; the workbook trying to save is the same
name as the currently open workbook.

In IE7 there is a different, immediate, failure without even getting to
the query for open or save. It says:
Internet Explorer cannot download the_generating_page from the_base_url.
Internet Explorer was not able to open this internet site. The requested
site is either unavailable or cannot be found. Please try again later.

This works fine in Firefox. There is nothing open in Excel other than
this application trying to do its thing. Also, that script that it says
it cannot open does exist (obviously, since it works in FF).

Aug 13 '08 #2

P: n/a
[F'up to a.html]
On Wed, 13 Aug 2008 16:45:14 -0400, sheldonlg wrote:
<sheldonlgwrote in message
news:B_******************************@giganews.com ...
>>I am top-posting this one time because this in new stuff
So? New stuff doesn't belong at the top, if it's building on what's already
in the post you're "replying" to.
>and I am leaving
the bottom for reference and description of the problem. I am also adding
comp.lang.php as this is all done in php and there is a remote possiblity
that I have to do something else in php.
Very remote. But don't lets bother the folks over at c.l.php until the HTML
actually works and your headers are correct. F'ups set to a.html.
>>
What is sent from php is as follows:

Headers (done with header calls):
Content-type: application/vnd.ms-excel
Content-Disposition: attachment; filename=foo.xls
Pragma: no-cache
Expires: 0

followed by:
<center><table border=1px><caption><h4>The Title</h4></caption>
<th>First Column</th><th>Second Column</th><th>Third Column</th>
<tr><td>1</td><td>2</td><td>3</td></tr>
<tr><td>4</td><td>5</td><td>6</td></tr></table>
I don't know the correct content-type for an Excel file, but assuming
you've chosen wisely, why aren't you sending an Excel file as data? What I
see you sending is some malformed corruption of an HTML table, sort of.
What do you really expect/want to happen?
>>
These are sent via an echo statement in php.

I have a sample app www.sheldonlg.com/excel/excel.php
also with invalid HTML.
>
I have put the php code up in www.sheldonlg.com/excel/excel.doc
If you had put it up in a .txt file I might (*might*) have looked, although
it exceeds my basic interest thus far.
>>
This sample app works fine in IE6, IE7, and FF.
"Works," you say. Okay...
> My problem is that on the
actual app, which is behind a firewall accessible only over VPN, I get the
errors listed in the original post (below) for IE6 and IE7. FF is
perfect.
My guess is that you have different file associations depending on your
browser environments. But I do not truly know.
>>
Does anyone have any ideas on how to track down this bug? I am looking
for an approach. (A solution would be even better :-), but that is like
asking for the moon).
Well, imperfect though it is, it seems that you have given us the part that
*isn't* causing the problem. So maybe you need to look, er, not-here (but
still address the problems I mentioned). What's the _difference_ between
this sample here and your live page?

GL.

--
John
Pondering the value of the UIP: http://improve-usenet.org/
Possessive "its" has no apostrophe. Even on the Internet.
Aug 14 '08 #3

P: n/a
sheldonlg wrote:
What is sent from php is as follows:

Headers (done with header calls):
Content-type: application/vnd.ms-excel
Content-Disposition: attachment; filename=foo.xls
Pragma: no-cache
Expires: 0
I solved the problem and am posting it here so that others can gain from
my experience.

It seems that IE6 has a problem downloading from secure server (https)
sites. That is why my sample app (http) worked but my real app (https)
didn't. The problem is in the no-cache statement. So when I commented
out the header line that generated the "Pragma: no-cache", it all worked
fine.
Aug 14 '08 #4

P: n/a
sheldonlg wrote:
sheldonlg wrote:
>What is sent from php is as follows:

Headers (done with header calls):
Content-type: application/vnd.ms-excel
Content-Disposition: attachment; filename=foo.xls
Pragma: no-cache
Expires: 0

I solved the problem and am posting it here so that others can gain
from my experience.

It seems that IE6 has a problem downloading from secure server (https)
sites. That is why my sample app (http) worked but my real app
(https) didn't. The problem is in the no-cache statement. So when I
commented out the header line that generated the "Pragma: no-cache",
it all worked fine.
But you still have the IE7 problem right?
Aug 14 '08 #5

P: n/a
Paul Lautman wrote:
sheldonlg wrote:
>sheldonlg wrote:
>>What is sent from php is as follows:

Headers (done with header calls):
Content-type: application/vnd.ms-excel
Content-Disposition: attachment; filename=foo.xls
Pragma: no-cache
Expires: 0
I solved the problem and am posting it here so that others can gain
from my experience.

It seems that IE6 has a problem downloading from secure server (https)
sites. That is why my sample app (http) worked but my real app
(https) didn't. The problem is in the no-cache statement. So when I
commented out the header line that generated the "Pragma: no-cache",
it all worked fine.

But you still have the IE7 problem right?

No. It fixed the IE7 problem as well. Sorry, I should have said
Internet Explorer and not IE6.
Aug 14 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.