Hi all,
im try the best to seach for my problem but i didn´t find the aswer.. 🙁
I have apache Ver. 1.3.33 and try the Ver. 2.0.54, PHP Ver. 4.4.0 and Win XP
and this peace of code does not work
if (!isset($_SERVER['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';
exit;
} else {
echo "<p>Hello {$_SERVER['PHP_AUTH_USER']}.</p>";
echo "<p>You entered {$_SERVER['PHP_AUTH_PW']} as your password.</p>";
}
in apache conf i turn on
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest
can anybody tell me if i have to make more conf. ???
the
$_SERVER['PHP_AUTH_USER']
always return nothing :mad:
thanks
João Santos