Randy,
I just tested an unchanged WAMPServer 2.5 installation using this PHP script
<?php
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
echo 'Text to send if user hits Cancel button';
exit;
} else {
echo "<p>Hello {$_SERVER['PHP_AUTH_USER']}.</p>";
echo "<p>You entered {$_SERVER['PHP_AUTH_PW']} as your password.</p>";
}
?>
Borrowed straight from the PHP online manual
All it does is echo back what you enter as a Userid & Password on the URL line but it proves that the $_SERVER variables are in fact set.
I did note that if I call this script without the `http://` at the beginnning of the url, then it does not work, could that be your problem?
So this does not work
AAAAAA:BBBBBBB@testing.dev/http-auth.php
But this does work. (without the single quotes, they are just to stop the forum converting the url)
'http://AAAAAA:BBBBBBB@testing.dev/http-auth.php'
---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>Read The Manuals Apache --
MySQL --
PHP --
phpMyAdminGet your Apache/MySQL/mariaDB/PHP ADDONs here from the
WAMPServer alternate Repo-X-X-X-
Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-