Authentication Error
| From: | Joey | Date: | Fri, 16 Jun 2000 14:48:39 +0000 |
| Subject: | Authentication Error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-2073@lists.php.net to get a copy of this message | ||
Hello,
I'm hoping someone can help me with the following error. I running PHP
4.0 with Netscape Enterprise Server on a Sun box. When i try the following
code I get an error.
CODE !!
<?
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>";
}
?
ERROR MESSAGE !!
[16/Jun/2000:11:42:17] failure (23511): for host xxx.xxx.xxx.xxx trying to
GET /
test/test.php, cgieng_scan_headers reports: the CGI program
/usr/local/bin/php d
id not produce a valid header (name without value: got line "http/1.0 401
unauth
orized")
This code is an example from the php documentation. Are there any configure
options when setting up PHP that i might have missed ?
Thanks for the help
Joey