server error: authenticate
| From: | Nicholas_Chen at compal dot com | Date: | Thu, 01 Feb 2001 00:57:37 +0000 |
| Subject: | server error: authenticate | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-5296@lists.php.net to get a copy of this message | ||
Dear All,
I don't think there is something wrong with the following piece of script,
but it does make Apache send a 500-server-internal-error. The error.log of
Apache indicates
"malformed header from script. Bad header=HTTP/1.0 401 Unauthorized ...".
Would you please give me a hand? Thank you very much!
Best regards,
Nicholas Chen
PS. Error occurred on Abria SQL Lite with Windows 98
The script is:
<?php
if (!isset( $PHP_AUTH_USER ))
{
Header( "WWW-Authenticate: Basic realm=\"member\"" );
Header( "HTTP/1.0 401 Unauthorized" );
exit;
}
else
{
echo "Hello, $PHP_AUTH_USER<p>";
}
?>