It HAS just occurred to me... With the help of a woman and codeing partner, well, they found out a long time ago, I only just looked at it now, but when you log out of the game... it doesnt. The cookie is never destroyed.
Has any one else noticed this? Logout, then go back to your games root path and you will still be logged in. Odd.
Mmmmm... not sure with 100% accuracy, but if I had to guess...
1. login.php/logout() includes globals.php. 2. globals.php includes cookies.php and runs checkcookies(), which in fact creates a new cookie each time it runs. 3. logout() then tries to set another cookie with the same name, but with a different time. 4. ??? 5. Profit!!!
But seriously, I dunno... maybe there is a conflict between the cookie that got set from checkcookies(), and the one that logout() is trying to set/unset. Maybe you can't send more than one cookie per page load? But then, I've worked with a lot of stuff that used a similar take on the same cookie-setting mechanism (validate user from cookie, set cookie with new timestamp, then nullify the cookie later if we have to logout) and I've never ran into the problem before.
I guess you can try changing
Code:
include("globals.php");
to
Code:
$controlrow = dorow(doquery("SELECT * FROM <<control>> WHERE id='1' LIMIT 1"));
and see if that solves the logout issue. If it does, then at least we know it's something caused by whatever is going on in globals.php...
---Jamin
_________________________
Diablo 3 Lead Designer Jay Wilson: “The development of a Blizzard game is sometimes a long affair. This is how long it took us to be ready.”