Re: php_auth_user not passed back to Apache

From: Date: Mon, 04 Dec 2000 15:46:44 +0000
Subject: Re: php_auth_user not passed back to Apache
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-4279@lists.php.net to get a copy of this message
claude 90 wrote: > I'm using Apache 1.3.14/php4 (module) running on W98. > I have a problem using PHP authentification. The simple program I'm using > is: > <?php > > if(!isset($PHP_AUTH_USER)) { > Header("WWW-Authenticate: Basic realm=\"Intranet\""); > Header("Status: 401 Unauthorized"); > } else { > echo $PHP_AUTH_USER; > } > ?> > and it doesn't work. It looks like the value of php_auth_user is never > set... I'm desesperate... This may not be registering if you have register_globals set to Off in your php.ini. Try the variables $HTTP_SERVER_VARS["PHP_AUTH_USER"] and $HTTP_SERVER_VARS["PHP_AUTH_PW"] in your scripts to check. Global $PHP_* vars don't get registered if register_globals is set to Off. Or, use your above code, but set register_globals to On. -- Andy Hoffman Web Developer Bristol-Myers Squibb email: andy.hoffman@bms.com

« previous php.windows (#4279) next »