Streaming download to IE doesn't work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all.

I'm streaming a file ( location of which is to be hidden from clients,
hence the need to stream ). Basically I'm doing:

---

session_start();
// some authentication stuff and figuring out the path goes here
// ...
// ...
$source = "/accounts_reports/" . $_GET['id'] . ".bin";
header( "Content-Disposition: attachment; filename=\"" . $orig . "\"" );
header( "Content-Length: " .filesize( $source ) );
header( "Content-Type: application/octet-stream" );
header( "Pragma: no-cache" );
header( "Expires: 0" );
readfile( $source );

---

This works *perfectly* with firefox. It doesn't work at all with
Internet Explorer. Also ( not sure if this matters or not ), the site is
accessed via https ONLY.

When I click the link to my download php script, I get a dialog asking
if I want to open or save the file, and then whnatever I click, I get:


> Internet Explorer cannot download download.php?id=32 from IP_ADDRESS.
> 
> Internet Explorer was not able to open this Internet site. The
> requested site is either unavailable or cannot be found. Please try
> again later.

However, a quick check of apache's ssl access log shows that IE did in
fact 'find' the site. Also, IE is producing the download dialog, which
suggests that it's 'found' the download.php script fine.

Now, before I get a litany of 'just use firefox then' responses, rest
assured that I would take this approach if I could, but the site is for
a customer, and they are in turn doing it for their customers, and this
just isn't going to fly. It MUST work with IE.

Who knows WTF is wrong and how I can work around it?

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak@xxxxxxxxxxxxxxxxxxxx
website: http://www.nusconsulting.com.au

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux