Scratch that. It's just IE. In all my testing, my script changed such that the issue changed a well, causing me to chase in the wrong direction. I reverted back to my first version where it worked everywhere but IE and the issue was that IE couldn't even find the server when you clicked on the download link. It is a documented IE https bug:
http://mark.koli.ch/2009/10/internet-explorer-cant-open-file-via-https-try-removing-the-pragma-header.html Removing the pragma header (by setting it to blank) resolved the issue. On Feb 12, 2011, at 19:36, [email protected] wrote: > More terming suggests that this is a Windows issue, not IE. In encountering > thus same thing with Firefox and Safari on Windows. > > > > On Feb 12, 2011, at 19:11, Wade Preston Shearer <[email protected]> > wrote: > >> Right. >> >> Here's an example of the idea (not my code, but it's the same concept): >> >> $gotten = @mysql_query("select * from pdf order by pid desc limit 1"); >> $row = @mysql_fetch_assoc($gotten); >> $bytes = $row[imgdata]; >> header("Content-type: application/pdf"); >> header('Content-disposition: attachment; filename="thing.pdf"'); >> print $bytes; >> >> >> This works in all browsers but IE. >> >> >> On Feb 12, 2011, at 05:14 PM, Sean Thayne <[email protected]> wrote: >> >> http://www.php.net/header >> >> // We'll be outputting a PDF >> header('Content-type: application/pdf'); >> >> // It will be called downloaded.pdf >> header('Content-Disposition: attachment; filename="downloaded.pdf"'); >> >> - Sean >> >> >> On Sat, Feb 12, 2011 at 6:08 PM, <[email protected]> wrote: >> I have a server that is dynamically generating a PDF as a string of bytes. >> Initiating a download and sending the bytes out to the buffer works in all >> browsers except IE (of course). In IE, the file cannot be read because it's >> corrupted. My experience with downloading files via a script is that it's a >> delicate science, but I was able to construct a script a few years ago that >> has the right combination of headers and server settings such that it works >> in all browsers. This is the first time I have tried to provide a file >> download for a file that is generated though (opposed to existing in the >> file system). Any tips on how to get this to work in IE? >> >> _______________________________________________ >> >> UPHPU mailing list >> [email protected] >> http://uphpu.org/mailman/listinfo/uphpu >> IRC: #uphpu on irc.freenode.net >> >> >> _______________________________________________ >> >> UPHPU mailing list >> [email protected] >> http://uphpu.org/mailman/listinfo/uphpu >> IRC: #uphpu on irc.freenode.net _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
