473,439 Members | 1,731 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,439 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 1813

<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...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.