RE: [PHP-WIN] $PHP_AUTH_USER
| From: | Ross Fleming | Date: | Sun, 11 Nov 2001 16:23:48 +0000 |
| Subject: | RE: [PHP-WIN] $PHP_AUTH_USER | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-10345@lists.php.net to get a copy of this message | ||
How are you using PHP with the webserver? If you're running it as a CGI
script then you can't access those variables
Ross
-----Original Message-----
From: morten [mailto:morten@achtung.dk]
Sent: 11 November 2001 14:55
To: php-windows@lists.php.net
Subject: [PHP-WIN] $PHP_AUTH_USER
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
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
For additional commands, e-mail: php-windows-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net