Re: PHP 4.0 Bug #7677: WWW-Authenticate Problem
| From: | Jean-Michel Dault | Date: | Tue, 07 Nov 2000 11:38:43 +0000 |
| Subject: | Re: PHP 4.0 Bug #7677: WWW-Authenticate Problem | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-37343@lists.php.net to get a copy of this message | ||
On 7 Nov 2000 oleg@vsi.ru wrote:
> I have Apache 1.3.9 + PHP 4.0.3pl1 compiled as Apache module. When I
have access to page with following script from Netscape 4/Linux, this
script works correctly. But from IE5, script always authenticate fail. Why ?
>
> <?
> if(!isset($PHP_AUTH_USER)) {
> Header("WWW-Authenticate: Basic realm=\"TEST\"");
> Header("HTTP/1.0 401 Unauthorized");
> echo "Authenticate required\n";
> exit;
> } else {
> echo "User: $PHP_AUTH_USER, Pass: $PHP_AUTH_PW.<P>";
> }
> ?>
Reverse the two Header lines and it will work.
------------------------------------------------------------
Jean-Michel Dault <jmdault@mandrakesoft.com>
MandrakeSoft inc, Montreal (Canada)
HTCPCP/1.0 Developper (http://www.ietf.org/rfc/rfc2324.txt)