Entry
$PHP_AUTH_USER is not set from the Authentication box, PHP is running as Apache Modulem Why?
Jul 23rd, 2004 08:35
Philip Olson, yadava aryal,
There could be several possible reasons, here are a few:
1) The register_globals setting is off (it's off by default as of PHP
4.2.0) and if so it will not be set. Regardless of the setting you
could (should) use $_SERVER['PHP_AUTH_USER']
2) There is a bug in PHP 5.0.0 which causes PHP_AUTH_USER to not exist
so if you're using this version...that's why.
3) When safe_mode is enabled, PHP_AUTH_* variables are not available when
an external auth system is used. (As of PHP 4.3.0)
4) Try REMOTE_USER instead
5) Or, you're simply not writing proper code, be sure to read the
following:
http://www.php.net/features.http-auth