I'm using this code,
if( (!isset( $PHP_AUTH_USER )) || (!isset($PHP_AUTH_PW)) ||
($PHP_AUTH_USER != 'username') || ($PHP_AUTH_PW != 'pass')
){
header('WWW-Authenticate:Basic realm="Member Only"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.';
echo $PHP_AUTH_USER;
echo $PHP_AUTH_PW;
exit;
}
which works fine on another webserver where I worked.
Now I installed Apache2 on my own WinXP desktop and setting up all those PHP successfully.
But I got a problem with authentication thing!
The pop-up window repeat again and again even the username and password is correct. so, i have to cancle it. therefore i can't access that page in the result.
Why is that?
Anybody knows how to fix it??
Thank you