Re: File download by php header...

From: Date: Mon, 21 Jul 2003 16:39:20 +0000
Subject: Re: File download by php header...
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-156090@lists.php.net to get a copy of this message
> btw, also on the content-disposition, not only will some browsers not > honor that, they will just use the name of the script as the 'save-as' > filename. That's okay with the 'save as' filename because no one know hte real filename on the webserver because it is renamed when it is download anyway. "Curt Zirzow" <curt@zirzow.dyndns.org> wrote in message news:20030721145810.GF50131@bagend.shire... > * Thus wrote Scott Fletcher (scott@abcoa.com): > > Hi! > > > > I'm using PHP 4.3.2 and IIS 5.0. I'm using the PHP header to > > cause the webserver to download the file to the web browser. Some > > of the time it work and some of the other time, it doesnt. I > > haven't figured out why until I looked in the error log which > > showed hte problem... See two clipping below. > > > > --snip-- //Send Downloadable File(s) To Browsers... > > $total=$DownloadUpdateArray[$_REQUEST['dw_code']][0]; header > > ("Content-Type: application/octet-stream"); header ("Content-Length: > > ".filesize($total)); header ("Content-Disposition: attachment; > > filename=".$DownloadUpdateArray[$_REQUEST['dw_code']][1]); > > readfile($total); --snip-- > > > > --snip-- [21-Jul-2003 09:15:33] PHP Fatal error: Maximum execution > > time of 30 seconds exceeded in D:\<<filepath>>\menu\tech_support.php > > on line 47 --snip > > > > So, how does the php header("content-disposition:attachment; > > filename='***'") cause the php timeout in the first place, what > > seem to be the problem? > > It doesn't. Your script is taking over 30 seconds to run you will need > to find out why and where its taking to long or extend your time-out > setting. > > btw, also on the content-disposition, not only will some browsers not > honor that, they will just use the name of the script as the 'save-as' > filename. > > Curt > -- > "I used to think I was indecisive, but now I'm not so sure."

« previous php.general (#156090) next »