Phil,
You da man! It just doesn't get any sweeter. Register_globals is off.
Thank you,
Larry S. Brown
Dimension Networks, Inc.
-Original Message-
From: Philip Hallstrom [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 7:40 PM
To: Larry Brown
Cc: PHP List
Subject: Re: PHP_AUTH_USER failing, please help me...
Just a quick guess that register_globals is probably turned off (check
with a phpinfo() to be sure) and therefore $PHP_AUTH_USER and $PHP_AUTH_PW
are not being set.
Or, try $_SERVER[PHP_AUTH_USER], etc...
On Mon, 25 Nov 2002, Larry Brown wrote:
> 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.
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php