From: [EMAIL PROTECTED] Operating system: Windows 2000 PHP version: 4.1.2 PHP Bug Type: Output Control Bug description: Header problem content-disposition
Hi, I believe there is an issue with the header function in 4.1.2 windows Apache module (or it may be a configuration issue on my end, but hear me out =)) First let me state, that I know and understand that IE 5 and 5.5sp1 and even IE 6 have all sorts of issues with content-disposition and how it handles mime-types in general. I don't believe that to be the core issue. I had a script that worked in 4.1.1 until I upgraded to 4.1.2 (apache module + win 2000) I've cut it down to pretty much as simple as possible to eliminate coding issues on my end. <?php header("Expires: Mon, 26 Nov 1962 00:00:00 GMT"); header("Last-Modified: " . gmdate("D,d M YH:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=22119.pdf"); readfile("download/22119.pdf"); ?> This script will cause IE to give the user a "File Open/Save" dialogue box with the correct filename (in this example 22119.pdf) when running on 4.1.1 (which is the desired effect). On 4.1.2 IE will display the "File Open/Save" dialogue box will come up but display the name of the script (download.php for example) and then will display another warning box if you hit "save" stating that it couldn't download the file "download.php" from www.myserver.com. Of course this functionality works like a dream in Netscape regardless of version. Thank you in advance for your consideration of this potential issue =) With best regards, Erik -- Edit bug report at http://bugs.php.net/?id=16210&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16210&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16210&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16210&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16210&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16210&r=support Expected behavior: http://bugs.php.net/fix.php?id=16210&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16210&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16210&r=submittedtwice