$PHP_AUTH_USER
| From: | morten | Date: | Sun, 11 Nov 2001 14:55:07 +0000 |
| Subject: | $PHP_AUTH_USER | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-10344@lists.php.net to get a copy of this message | ||
Hi,
I am trying to find out how to use $PHP_AUTH_USER. The problem is
that I don't progress because of an 'Internal Server Error'. I tried this
script
from php.net:
<?php
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";
exit;
} else {
echo "<p>Hello $PHP_AUTH_USER.</p>";
echo "<p>You entered $PHP_AUTH_PW as your password.</p>";
}
?>
But the only answer is this: Internal Server Error. Is it the php.ini file
that's not
configured well, or..?
Morten