diff --git a/appendices/predefined.xml b/appendices/predefined.xml index 8a0c537ac6..75bb9035fc 100644 --- a/appendices/predefined.xml +++ b/appendices/predefined.xml @@ -1,5 +1,5 @@ - + + + + 'PHP_AUTH_USER' + + + When running under Apache as module doing HTTP authentication this + variable is set to the username prodived by the user. + + + + + + 'PHP_AUTH_PW' + + + When running under Apache as module doing HTTP authentication this + variable is set to the password prodived by the user. + + + + + + 'PHP_AUTH_TYPE' + + + When running under Apache as module doing HTTP authenticated this + variable is set to the authentication type. + + + diff --git a/appendices/reserved.xml b/appendices/reserved.xml index 8034fc4544..58f4575d3b 100755 --- a/appendices/reserved.xml +++ b/appendices/reserved.xml @@ -1,5 +1,5 @@ - + List of Reserved Words @@ -555,6 +555,36 @@ + + 'PHP_AUTH_USER' + + + When running under Apache as module doing HTTP authentication this + variable is set to the username prodived by the user. + + + + + + 'PHP_AUTH_PW' + + + When running under Apache as module doing HTTP authentication this + variable is set to the password prodived by the user. + + + + + + 'PHP_AUTH_TYPE' + + + When running under Apache as module doing HTTP authenticated this + variable is set to the authentication type. + + + + diff --git a/features/http-auth.xml b/features/http-auth.xml index 6f8eb12c78..889a9b3e5a 100644 --- a/features/http-auth.xml +++ b/features/http-auth.xml @@ -1,5 +1,5 @@ - + HTTP authentication with PHP @@ -25,14 +25,14 @@ Hello $PHP_AUTH_USER.

"; - echo "

You entered $PHP_AUTH_PW as your password.

"; + echo "

Hello {$_SERVER['PHP_AUTH_USER']}.

"; + echo "

You entered {$_SERVER['$PHP_AUTH_PW']} as your password.

"; } ?> ]]> @@ -104,15 +104,15 @@ exit; } - if (!isset($PHP_AUTH_USER) || ($SeenBefore == 1 && !strcmp($OldAuth, $PHP_AUTH_USER))) { + if (!isset($_SERVER['PHP_AUTH_USER']) || ($SeenBefore == 1 && $OldAuth == $_SERVER['$PHP_AUTH_USER']))) { authenticate(); } else { - echo "

Welcome: $PHP_AUTH_USER
"; - echo "Old: $OldAuth"; - echo "

\n"; + echo "

Welcome: {$_SERVER['$PHP_AUTH_USER']}
"; + echo "Old: {$_REQUEST['$OldAuth']}"; + echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "

\n"; }