ID:               13601
 Comment by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Closed
 Bug Type:         Apache related
 Operating System: Linux (Red Hat 7)
 PHP Version:      4.0.6
 New Comment:

Here is your code, altered slightly

$userfile = "file.xls";

$size = filesize($userfile);
$fp=fopen($userfile,"r");

header("Pragma: no-cache");// HTTP/1.0
header("Cache-Control: no-cache, must-revalidate");// HTTP/1.1
header("Content-Type: application/octet-stream");
if(preg_match("/MSIE 5.5/", $HTTP_USER_AGENT)) {
        $header = "Content-Disposition: filename=".$userfile;
        //header("Content-Disposition: filename=$userfile");
}else {
        $header = "Content-Disposition: attachment;
filename=".$userfile;
        //header("Content-Disposition: attachment;
filename=$userfile");
}

header($header);
$header_str = "Content-Length: ".$size;
header($header_str);
header("Content-Transfer-Encoding: binary\n");
fpassthru($fp);


Hope this works.


Previous Comments:
------------------------------------------------------------------------

[2001-11-22 02:46:57] [EMAIL PROTECTED]


Not tham I am specifically aware of, but it is highly possible that my
ISP (BT Internet) has some kind of proxy.

Incidentally, I have tried a couple of different ISPs with the same
result.

I would guess that this IS a proxying-related issue.

------------------------------------------------------------------------

[2001-11-21 12:25:12] [EMAIL PROTECTED]

Are you sure there isn't some transparent proxy involved?


------------------------------------------------------------------------

[2001-11-20 06:55:25] [EMAIL PROTECTED]

As stated in my original submission, EITHER going through a proxy, OR
simply dialling up through an ISP, you get the problem.

Connecting directly over a LAN, you do not.

Please re-open.

------------------------------------------------------------------------

[2001-11-14 06:41:49] [EMAIL PROTECTED]

No feedback. Closing.

------------------------------------------------------------------------

[2001-10-23 06:23:12] [EMAIL PROTECTED]

I would guess this has something to do with proxy being 
in between..is there one?

--Jani


------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/13601

-- 
Edit this bug report at http://bugs.php.net/?id=13601&edit=1

Reply via email to