View Full Version : netscape users can't log in. Ideas?
bira
Wed 21st Feb '01, 10:02pm
Hi,
A couple users complained they can't log in with netscape version 4.76.
I tried logging in to my BB with netscape 4.72 and I can't.
I delete every cookie - even went as far as deleted the entire user directory! - and it just does not work. No logging in.
It worked fine with Netscape on the test board, but the difference is that on the test board I had the domain left empty, and now I have it set to atlasf1.com (because I need the cookie for my.atlasf1.com as well).
Any ideas what I could do?
Thanks,
Bira
Mike Sullivan
Wed 21st Feb '01, 11:22pm
Probably related to the bad logging in code in beta 1 that has been addressed in beta 2.
bira
Thu 22nd Feb '01, 12:06am
Ed, I don't suppose you could post the specific code fix for this here? I mean, I got users who can't access the board at all now so it's a bit urgent for me.
Thanks.
Mike Sullivan
Thu 22nd Feb '01, 12:10am
I'm not going to explain this as beta 2 will be released soon, so don't even ask how to use it. It goes in the login section of member.php though:
$session['sessionhash']=md5(uniqid(microtime()));
$session['dbsessionhash']=$session['sessionhash'];
$DB_site->query("INSERT INTO session (sessionhash,userid,host,useragent,lastactivity,st yleid) VALUES ('".addslashes($session['sessionhash'])."','$userid','".addslashes($session['host'])."','".addslashes($session['useragent'])."','".time()."','$session[styleid]')");
vbsetcookie("sessionhash",$session['sessionhash'],0);
bira
Thu 22nd Feb '01, 1:20am
ok, thanks Ed. I'll try to play around with it and see if I manage to do the impossible :)
bira
Thu 22nd Feb '01, 2:06am
OK Ed the problem is definitely domain related, and therefore the above code does not solve the problem.
If I leave the cookie domain field in Options blank, Netscape users can log in and out without a problem, and indeed a www.atlasf1.com cookie is created on their computer.
If, however, I put atlasf1.com in the domain field, Netscape users cannot log in at all, and a cookie is not even created on their computer.
Since the BB login and cookie serves other services on my website (the bb is at www.atlasf1.com/bb whereas the other service is on my.atlasf1.com) I'm not sure what to do now. Something in the setcookie command is wrong, it seems, and I just don't have the slightest clue what it is or how to fix it.
If there is anyone here who knows something about cookies, I would really appreciate help.
Thanks,
Bira
Mike Sullivan
Thu 22nd Feb '01, 2:09am
Try .atlasf1.com for the domain and / for the path -- note the dot!
Mike Sullivan
Thu 22nd Feb '01, 2:11am
Come to think of it, I think the official cookie spec (which Netscape developed IIRC) requires 2 dots in the domain name, so helloatlasf1.com will not get atlasf1.com cookies.
bira
Thu 22nd Feb '01, 2:18am
Ed, if you ever need a personal slave - I am yours. THANK YOU!!!
(yes, the dot before atlasf1 did the trick :D)
bira
Thu 22nd Feb '01, 2:25am
p.s.
Just a small suggestion for the next release:
In the control panel Options, under Cookie Domain, you might want to change the text. It currently says:
The domain on which you want the cookie to have effect. If you want this to affect all of yourhost.com rather than just forums.yourhost.com, enter yourhost.com here. Can be left blank.
So you might want to change it to "...enter .youhost.com (and don't skip the first dot!)" etc.
But again - thank you. I can now finally go to sleep :)
vBulletin® v3.8.0 Beta 3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.