Hello this does not work with apache + suexec and php running like cgi

#!/usr/local/bin/php

# in top of all php scripts
<?
   header("Content-Disposition: attachment; filename=$filename");
   header("Content-Type: application/octet-stream");
   header("Content-Length: ".filesize("$path/$filename"));
     header("Pragma: no-cache");
     header("Expires: 0");
   $fp=fopen("$path/$filename","r");
   print fread($fp, filesize("$path/$filename"));
   fclose($fp);
   exit();

?>

the file downloads but when open i get an error but when i try the same script on a machine with apache + php as a built in module it works, why does this ot work when access the script as cgi with apache + suxex ??

_________________________________________________________________
Hitta rätt på nätet med MSN Sök http://search.msn.se/

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



Reply via email to