php_auth_user problem
| From: | private private | Date: | Mon, 27 Nov 2000 15:37:05 +0000 |
| Subject: | php_auth_user problem | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-4126@lists.php.net to get a copy of this message | ||
Hello,
I'm running W98, Apache 1.3.14 and Php4 as a module for apache.
I would like to restrict webpages access using the variables php_auth_user and php_auth_pw with the function header(). Unfortunately when I try to read the values of the php_auth_ variables
nothing appear... It looks like these variables do not keep the values they were assigned...
For example here is a really simple programm that doesn't work with my configuration :
<?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 "Hello $PHP_AUTH_USER.<P>";
echo "You entered $PHP_AUTH_PW as your password.<P>";
}
?>
Thanks,
Claude
_____________________________________________________________________________________
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com