/    Sign up×
Community /Pin to ProfileBookmark

PHP authentication & IE5 SP2

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 resourcen”;
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

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@iamsnowdogauthorMay 13.2003 — anyone

anyone

anyone

Bueller

?
Copy linkTweet thisAlerts:
@pyroMay 13.2003 — 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.
×

Success!

Help @iamsnowdog spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...