note 41106 added to features.http-auth
| From: | Mattie at rn2 dot php dot net | Date: | Tue, 30 Mar 2004 11:50:39 +0000 |
| Subject: | note 41106 added to features.http-auth | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-67372@lists.php.net to get a copy of this message | ||
After I get the login promt (3 times), it still doesn't login,
all the variables are empty.
this is my test code:
<?
if (!isset($PHP_AUTH_USER)) {
header('WWW-Authenticate: Basic realm="My Realm"');
header('status: 401 Unauthorized');
echo 'Text to send if user hits Cancel button<br>';
echo ("1: ".$PHP_AUTH_USER."<br>");
echo ("2: ".$_SERVER['PHP_AUTH_USER']."<br>");
echo ("3: ".$_ENV['PHP_AUTH_USER']."<br>");
echo ("4: ".$REMOTE_USER."<br>");
echo ("5: ".$_SERVER['REMOTE_USER']."<br>");
echo ("6: ".$_ENV['REMOTE_USER']."<br>");
exit;
} else {
echo "<p>Hello {$PHP_AUTH_USER}.</p>";
echo "<p>You entered {$PHP_AUTH_PW} as your password.</p>";
}
?>
output (after filling in 3 times):
Text to send if user hits Cancel button
1:
2:
3:
4:
5:
6:
output are all blanks, anyone a idea?
(also tested the httP 1.0 blabla)
----
Manual Page -- http://www.php.net/manual/en/features.http-auth.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41106
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41106&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41106&report=yes
Search -- http://master.php.net/manage/user-notes.php