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

Problem downloading file in IE6

Obi
HI all,

I have a problem during download file with Internet Explorer 6.

I use this script:

header('Pragma: public');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Content-Type: application/octet-stream');
//header('Content-Type: application/force-download');
header('Content-Disposition: attachment; filename="'.$filename.'"');
header('Content-Transfer-Encoding: binary');
header('Content-Length: ' . filesize($dfile));

In same case, this open a dialog box asking if open or save a file
colled 'index.php' and not the correct file name
and the description file is 'php file'

May you help me?

thanks in advance
Fabio
Mar 2 '07 #1
3 3334
"Obi" posted...
: I have a problem during download file with Internet Explorer 6.

Internet Explorer is a BIG problem. over 90% of the world
uses it.

: I use this script:
:
: header('Pragma: public');
: header('Expires: 0');
: header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
: header('Content-Type: application/octet-stream');
: //header('Content-Type: application/force-download');
: header('Content-Disposition: attachment; filename="'.$filename.'"');
: header('Content-Transfer-Encoding: binary');
: header('Content-Length: ' . filesize($dfile));

Try taking out the // line? Did you check to see which headers
actually get sent to the client?

And are $filename and $dfile the same file?

: This opens a dialog box asking if open or save a file named
: 'index.php' (not the proper file).

echo("filename == " . $filename . "<br />");
echo("dfile == " . $dfile . "<br />");

It sounds like the server is delivering the wrong header for
an index.php file, so perhaps the variable $filename is an
empty string?

--
Jim Carlock
Post replies to the group.
Mar 2 '07 #2
PARDON if this posts twice. Something funny occurs with the
Road Runner/TimeWarner/BrightHouse servers.

"Obi" posted...
: I have a problem during download file with Internet Explorer 6.

Internet Explorer is a BIG problem. over 90% of the world
uses it.

: I use this script:
:
: header('Pragma: public');
: header('Expires: 0');
: header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
: header('Content-Type: application/octet-stream');
: //header('Content-Type: application/force-download');
: header('Content-Disposition: attachment; filename="'.$filename.'"');
: header('Content-Transfer-Encoding: binary');
: header('Content-Length: ' . filesize($dfile));

Try taking out the // line? Did you check to see which headers
actually get sent to the client?

And are $filename and $dfile the same file?

: This opens a dialog box asking if open or save a file named
: 'index.php' (not the proper file).

echo("filename == " . $filename . "<br />");
echo("dfile == " . $dfile . "<br />");

It sounds like the server is delivering the wrong header for
an index.php file, so perhaps the variable $filename is an
empty string?

--
Jim Carlock
Post replies to the group.
Mar 2 '07 #3
Obi
Jim Carlock wrote:
"Obi" posted...
: I have a problem during download file with Internet Explorer 6.

Internet Explorer is a BIG problem. over 90% of the world
uses it.

: I use this script:
:
: header('Pragma: public');
: header('Expires: 0');
: header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
: header('Content-Type: application/octet-stream');
: //header('Content-Type: application/force-download');
: header('Content-Disposition: attachment; filename="'.$filename.'"');
: header('Content-Transfer-Encoding: binary');
: header('Content-Length: ' . filesize($dfile));

Try taking out the // line? Did you check to see which headers
actually get sent to the client?

And are $filename and $dfile the same file?

: This opens a dialog box asking if open or save a file named
: 'index.php' (not the proper file).

echo("filename == " . $filename . "<br />");
echo("dfile == " . $dfile . "<br />");

It sounds like the server is delivering the wrong header for
an index.php file, so perhaps the variable $filename is an
empty string?
$filename is onle the name of file
$dfile is the relative path of file on the server

The big problem is, on my computer the script works fine.
On my customer computers, doesn' t works.

any ideas?
Mar 2 '07 #4

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

Similar topics

2
by: Bala | last post by:
Hi I am trying to download the PDF files from my webserver using ASP.Net. All my files are stored at F Drive on webserver. Like this F:\Main Folder\Sub Folder\Files\File1.pdf I am...
1
by: just.starting | last post by:
Hi, My dot net client downloads files and checks for any new files time to time. The server is apache2.0.53 server. So what happens is that my file download thing works fine if I dont try to call...
5
by: fniles | last post by:
We created an ActiveX control and marked it as safe for scripting using Implements IObjectSafety. We then created a CAB file and signed it using Verisign. We also created a license file (LPK file)...
0
by: just.starting | last post by:
I am having problem while downloading files from an apache server2.0.53 with php4.3.10.While downloading some files it generally stops after downloading some specific amount and then stops...
102
by: hug | last post by:
www.webmaster, was suggested that this ng could be a better place.] I've updated my test server to handle if-modified-since. I've noticed that the (old copies I run of) IE and Netscape seem...
1
by: alex23 | last post by:
Hey everyone, I'm trying to install setuptools on a work PC behind an NTLM firewall. I've tried to use APS as recommended but am still unable to have anything other than IE talk through...
1
by: Paul | last post by:
I just installed php 4.4 with apache 2.0 on WIN XP. All is working so far. From: the prompt, I type: go-pear and here's what I get: Loading zlib: ok Using local package: PEAR-stable......ok...
6
by: cyusman | last post by:
Hi, We have just moved our application to a new webfarm server environment which utilizing hardware load balancing, SSL off-loading and HTTP compression off-loading.My application is running on...
1
by: Muddasir | last post by:
Hello everyone. I am facing problem in downloading .xls file. I generate report and save data in excel sheet on server. and once user click the 'save data in excel format', an excel sheet is...
1
by: shahidrasul | last post by:
i want to download a file which user select from gridview, downloading is completing without problem but after download i want to refresh my page because i do some changes in db . but when...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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...

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.