Bizarre Login Problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Tehquickness
Forum Commoner
Posts: 32
Joined: Mon Oct 24, 2005 11:31 pm

Bizarre Login Problem

Post by Tehquickness »

Ok i created a log in script and it works fine.... sort of. For every other computer I have tried it on (about 50) it works just fine no problems at all, but when I use it on my own computer I have to log in twice. I log in the first time and then when i go to a page requireing login it will say i need to log in again. Once I log in again it works great. Any one know what could be causeing something like this? I have asked my users and they say it works great with no problems.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Sounds like your session or cookie or both is being lost due to crossing domain lines.
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

When you set your cookie with setcookie() make sure your domain name parameter is .domain.com. (The leading dot is important). Make sure your session domain name is set. I think you can do that with ini_set('session_domain', 'domain.com');

Hope that helps.
Post Reply