473,327 Members | 1,892 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,327 software developers and data experts.

Re: Download in IE and Firefox

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
5 1807

<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
[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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Movie Maniac? | last post by:
Hi everybody I'm writing a module for postnuke and MD-Pro to manage a subtitles section, and I'm experiencing some troubles with the download function. It works properly if I click directly...
3
by: fb | last post by:
A page I created includes a piece of javascript, shown at the foot of this posting, that opens up a new browser and displays a PDF File. The servlet "previewCompetencyLevel" generates the PDF and...
3
by: Nate Hekman | last post by:
I have an aspx page that generates a file on the fly for a person to download. It sends these http headers: Content-Type: text/plain Content-Disposition: attachment; filename="myfile.lic" ...
13
by: ron1972 | last post by:
Hi I have a large pdf file that if I create an anchor link to, the browser will try to open the file, which takes quite a long time. Is there a way to force the browser to download the file rather...
6
by: aljosa.mohorovic | last post by:
I have a problem when doing indirect download of file through php, when I click on download link Firefox and Internet Explorer give me same options: Open and Save. Firefox opens file directly from...
1
by: M.Babli | last post by:
Hello everyone, I do not know much about javascript, so please excuse me if my question is not clear.: If I build a string in Javascript string =...
2
by: kiranmate | last post by:
I am created a activeX control in VB 6 and created .cab file from that project which download my activeX control on client computers using Internet explorer but not on the FireFox browser. Can...
4
by: Rakhi | last post by:
hello i want to alter the download settings of mozilla firefox browser using javascript of my application !! wat is happenin in my application is, on calling a method , it make a file ready...
1
by: Rakhi | last post by:
hello i want to alter the download settings of mozilla firefox browser using javascript of my application !! wat is happenin in my application is, on calling a method , it make a file ready...
5
by: asedt | last post by:
Yep after Firefox 3 is out I can't find any information about the earlier Firefox versions. Where do i download Firefox 2, and find release information like before. I have looking around on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.