authentification problems
| From: | Yaroukh | Date: | Tue, 12 Sep 2000 19:05:00 +0000 |
| Subject: | authentification problems | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-2609@lists.php.net to get a copy of this message | ||
Hallo
Can anybody help me with authentification ? I've used following code:
--------------------------------------------------------------------------------
<?
If (!IsSet ($PHP_AUTH_USER)) {
Header ("WWW-Authenticate: Basic realm=\"My Realm\"");
Header ("HTTP/1.0 401 Unauthorized");
Echo "Text to send if user hits Cancel button\n";
} Else {
Echo "Hello $PHP_AUTH_USER.<P>";
Echo "You entered $PHP_AUTH_PW as your password.<P>";
}
?>
--------------------------------------------------------------------------------
... and this is what I get:
--------------------------------------------------------------------------------
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to
complete your request. Please contact the server administrator,
yaroukh@email.cz
and inform them of the time the error occurred, and anything you might
have
done that may have caused the error.
More information about this error may be available in the server error
log.
Apache/1.3.9 Server at localhost Port 80
--------------------------------------------------------------------------------
When I sent the GET-request directly via TELNET I get a message saying
something about malformed header. Is there a bug in the Header function
???
Please help
good luck
Yaroukh
--
-----------------------------------------------------------[yaroukh@email.cz]---