Click to See Complete Forum and Search --> : PHP authentication & IE5 SP2


iamsnowdog
05-08-2003, 03:21 PM
I have just received a strange complaint about our new website. We are using MySQL with PHP authentication for logons. I use the following select statement and rowcount variable:

<?
function authenticate() {
Header( "WWW-authenticate: basic realm=\"blahblahblah\"");
Header( "HTTP/1.0 401 Unauthorized");
echo "You must enter a valid username and password to access this resource\n";
exit;
}
if(!isset($_SERVER["PHP_AUTH_USER"])) { authenticate(); }
else {
$AuthUser = $_SERVER["PHP_AUTH_USER"]; $AuthPass = $_SERVER["PHP_AUTH_PW"];
$Result = mysql_db_query("alpha", "SELECT name FROM users WHERE username='$AuthUser' and password='$AuthPass'") or die (mysql_error());
$num = mysql_numrows($Result);
if($num == 1) { }
if($num == 0) { authenticate(); }
}
?>

It works fine using every browser I can find to use IE5/Net5 or newer, except for IE5 with service pack 2 installed. Is this a known problem? I don't get an error message or debug error, it just doesn't recognize that it is logged in or isn't logging in at all.

Please help

iamsnowdog
05-13-2003, 12:34 PM
anyone

anyone

anyone

Bueller

:(

pyro
05-13-2003, 12:38 PM
Sounds like a browser bug, to me... not sure what to tell you if it works in all browsers, save one...

Also, I moved this to our new section, PHP.