Guest_imported
New member
- Jan 1, 1970
- 0
I need to make an authorization using PHP... from php.net I make such example:
<?php
if(!isset($PHP_AUTH_USER)) {
Header(" BASIC realm=\"My Realm\", stale=false"
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>";
}
?>
But, I only get error message:
[Wed Aug 01 15:16:32 2001] [error] [client 217.22.164.179] malformed header from script. Bad header=HTTP/1.0 401: d:/program files/apache group/apache/php/php.exe
please help
<?php
if(!isset($PHP_AUTH_USER)) {
Header(" BASIC realm=\"My Realm\", stale=false"
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>";
}
?>
But, I only get error message:
[Wed Aug 01 15:16:32 2001] [error] [client 217.22.164.179] malformed header from script. Bad header=HTTP/1.0 401: d:/program files/apache group/apache/php/php.exe
please help