PHP_AUTH_USER failing, please help me...
| From: | Larry Brown | Date: | Tue, 26 Nov 2002 00:36:00 +0000 |
| Subject: | PHP_AUTH_USER failing, please help me... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-126025@lists.php.net to get a copy of this message | ||
I just built a new server and loaded with RH8. I copied my php files over
to the new apache server and modified the links. I couldn't find any
mention of php in the httpd.conf so I figured it must me compiled into httpd
so I tested it. The PHP files load, however, the php_auth_user and
php_auth_pw don't work. They prompt the user yet with :
if (isset( $PHP_AUTH_USER ) && isset($PHP_AUTH_PW)) {
echo $PHP_AUTH_USER;
echo $PHP_AUTH_PW;
} if ( ! $auth )
{
header( 'WWW-Authenticate: Basic realm="Private"' );
header( 'HTTP/1.0 401 Unauthorized' );
echo 'Authorization Required.';
echo $PHP_AUTH_USER;
echo $PHP_AUTH_PW;
echo "OK?";
exit;
}
else
{
echo $PHP_AUTH_USER;
echo $PHP_AUTH_PW;
}
The prompt comes up and asks for a password three times. After the three it
prints... Authorization Required.OK?
So it appears as though it is not returning the variables. The php version
is 4.2.2 and apache is 2.0.4 (redhat).
Larry S. Brown
Dimension Networks, Inc.