Bug #11498 Updated: HTTP Authentication via PHP using documented code does not work
| From: | sniper@php.net | Date: | Fri, 15 Jun 2001 14:01:24 +0000 |
| Subject: | Bug #11498 Updated: HTTP Authentication via PHP using documented code does not work | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-56760@lists.php.net to get a copy of this message | ||
ID: 11498
Updated by: sniper
Reported By: nateh999@yahoo.com
Old-Status: Open
Status: Bogus
Bug Type: Unknown/Other Function
Operating system:
PHP Version: 4.0.5
Assigned To:
Comments:
works for me just fine, you're doing something wrong.
this is wrong place to ask support questions. Try some public forum.
Previous Comments:
---------------------------------------------------------------------------
[2001-06-15 04:08:16] nateh999@yahoo.com
Hi, trying to do simple HTTP authentication (just to get it working, as the original mySQL connected
version did not work -- same "symptoms") with this php code:
<?php
if(!isset($PHP_AUTH_USER)) {
Header("WWW-Authenticate: Basic realm="My Realm"");
Header("Status: 401 Unauthorized");
echo "Text to send if user hits Cancel buttonn";
exit;
} else {
echo "Hello $PHP_AUTH_USER.<P>";
echo "You entered $PHP_AUTH_PW as your password.<P>";
}
?>
this is in a standalone file, login.php
it brings up the login prompt, but seems unable to get past that -- entering a login does nothing.
The popup shows 3 times, then it redirects to a page displaying the results of the "echo
"Text to send if user hits Cancel Buttonn";" line.
Not sure if i'm doing something wrong (doubt it, i copied this code from php.net after trying
to write my own (which got the same results)) or if this is a bug....it may well be a bug with
apache, but perhaps y'all know something about this....
Software setup info:
SERVER_SOFTWARE => Apache/1.3.20 (Win32)
SERVER_PROTOCOL => HTTP/1.1
HTTP_USER_AGENT => Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
PHP Version: 4.0.5
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11498&edit=2