Re: Error opening files sent via PHP script with IE on XP

From: Date: Tue, 25 Nov 2003 10:34:00 +0000
Subject: Re: Error opening files sent via PHP script with IE on XP
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-22183@lists.php.net to get a copy of this message
Never mind I found a sollution. I'm using sessions and thereby sending header("Cache-control: private"); Fixed the problem! Jarl E. Gjessing wrote: > I have made a website where registered users can download > documents from a protected area. > Only problem is, that users using windows XP and internet explorer cannot > use the Open, when they klik the link. > I have tried various browsers under Linux and Windows 2000, they dont have > any problems. > I pass a URL like: > ú¸œð0Þ“«Åz‘ > ‹rhttp://<SERVERNAME>/index.php?file=/Individuelopgave_uge45/HA/Document.doc > To the server. The PHP script then tages the file argument, and fetches > the file from the server in a location like: > /var/lib/webcol/<filepath> > > Sends it to the browser in this way: > header("Content-Type: ".$mime); > header("Content-Disposition: attachment; > filename=\"".$filename."\""); > header("Content-Description: File Downloaded from webcol"); > header("Content-Length: ".filesize($ROOT.$_GET['file'])); > $fd=fopen($ROOT.$_GET['file'], "r"); > fpassthru($fd); > fclose($fd); > return; > > Where $ROOT could be: > /var/lib/webcol/<filepath> > mime is determined from a mimetype template we've made. > An example would in this case be: > applications/msword > > The problem is, that when clicking the link, Word starts as expected, but > then reports, that it cannot find the temporary file that Internet > Explorer tells Word that it has been stored as. > And this is true. It does not exist > > Any help would be appreciated, thanks

« previous php.windows (#22183) next »