Page 1 of 1

Need PHP Pro - Downloading exe files

Posted: Sat Jul 30, 2005 1:24 pm
by JD2144
I'm fairly new to php, so far I like it alot. I'm running into a problem that I hope someone can help me with.
I put a simple php download script (shown below) for testing on my webhost, and it works fine except there seems to be a problem when I use IE.
The file (test.exe) downloads no problem, but it is digitally signed and when I download with IE it does not recognize the digital signature, however if I paste the file link into the URL on IE it downloads and recognizes it no problem! Is there something different I have to do in PHP to allow this to recognize the exe sig? The file downloads and installs fine through Firefox and Netscape of course since they dont use dig sigs, but IE will not allow this (the file is definitely ok, something in IE is not allowing this to work the same way as it would by linking to it or pasting the link in the URL).

header('Content-Type: application/x-msdownload');
header('Content-Disposition: attachment; filename="' . $file . '"');
readfile("$file");

Posted: Sat Jul 30, 2005 9:08 pm
by feyd
IE, somewhat recently has added to its security layers. It now basically requires that the file extension sending the file matches the file extension being sent.. I know there are ways around it, but can't remember off the top of my head.. search around here or on the net about it..