PHP_AUTH_(USER|PW) not set

From: Date: Sat, 19 Oct 2002 14:09:27 +0000
Subject: PHP_AUTH_(USER|PW) not set
Groups: php.dev 
Request: Send a blank email to php-dev+get-89732@lists.php.net to get a copy of this message
The following script fails with the todays snapshot and with PHP 4.3.0-pre1: <?php if (!isset($PHP_AUTH_USER)) { header("WWW-Authenticate: Basic realm=\"Foobar\""); header("HTTP/1.0 401 Unauthorized"); echo "Access denied."; exit; } else { echo "Hello"; } ?> I looks like $PHP_AUTH_(USER|PW) are not set properly. Register_globals is set to on, but the same problem also occurs when setting it to off and using $_SERVER['PHP_AUTH_USER'] then. (Apache 1.3.26, Linux) Any clues? -- - Martin Martin Jansen http://martinjansen.com/

« previous php.dev (#89732) next »