Re: File download + HTTP auth problem.
| From: | rija | Date: | Tue, 05 Nov 2002 21:45:51 +0000 |
| Subject: | Re: File download + HTTP auth problem. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-122865@lists.php.net to get a copy of this message | ||
Simply, HTTP Authentification
Header("WWW-Authenticate: Basic realm='something'")
does not work with microsoft product, so you need to buy Microsoft
authentification from Microsoft to do something like it.
----- Original Message -----
From: "Rodolfo Gonzalez" <rodolfo@equinoxe.g-networks.net>
To: <php-general@lists.php.net>
Sent: Wednesday, November 06, 2002 6:29 AM
Subject: [PHP] File download + HTTP auth problem.
> Hello,
>
> I have this simple script called index.php in a directory protected with
> HTTP auth (require valid-user):
>
> <?php
> $archivo = '/somewhere/out/docroot/registro.csv';
> header('Content-Type: application/octect-stream');
> header('Content-Length: '.filesize($archivo));
> header('Content-Disposition: attachment; filename=registro.csv');
> @readfile($archivo);
> ?>
>
> When I access the directory with Netscape/Mozilla/Galeon it works fine,
> Apache "asks" the login and password and the script sends the file. But
> with MSIE 6.x (from Windows XP) it does not work: it presents the download
> dialog asking to save or open the file, but then MSIE reports an error
> and does not download the file. I discovered later that Konqueror asks for
> the login and password again when the download starts. What could be
> causing this?. Thanks in advance.
>
> Rodolfo.
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>