Im having a problem with HTTP authentication. I'm using IIS 5 on Win XP with PHP 4.3.8. I have installaed PHP as an ISAPI module as per the instructions. Generally PHP is working just fine.
The problem is that if I put a user name and password in, the loging dialog just keeps comming up.
I'm using the following test 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>";
}
?>
In IIS I have set the Directory Security to "Basic Authentication" and unchecked "integrated Windows authentication".
This frustrating thing is that I have the same setup on another PC which is working just fine.
Any pointers would be much appreciated.
Thanks.