UBB.Dev
Posted By: Erik_Rana Cookie prefix? - 03/03/2003 10:06 PM
Is there many out there running their forum without cookie prefix?
From config settings...
[] Custom cookie prefix. Can be left blank but useful if you have 2 installs and don't want cookies from one overwriting the other. WARNING: Changing this will make all current cookies invalid, meaning everyone will be logged out.
[/]

I have to help users almost every week now to clean cookies or they dont get in..
I tryed to let them use cookiepal, but it does not seem to work all the time
It might be that we had the site for a while on www.smygis.com and not forum.smygis.com then moved to forum.smygis.com
But that does not really explain why they can login and get in to their page but when they klick on Main index they get logged out

Is it possible to modify cookiepal so it removes any cookie set by all hosts on the domain? like a "if *smygis.com then delete"?
Posted By: JoshPet Re: Cookie prefix? - 03/03/2003 10:26 PM
Yes, you can't use the multiple domains at the same time. It sees those as different cookies.

You need to use the same URL consistantly.

If a user logs in at smygis.com (without the www) they can login and get a cookie for that domain.... then when they click a link, they will probably be taken to www.smygis.com (or forum.smygis.com) and thus they aren't logged in there. Then everything get's confused at that point. One click they are logged in, another they are not.

I tried to run .com and .net of my domain at the same time during a server move. Bad idea. I ended up setting up .net to forward to .com. Because people couldn't stay logged in.

Cookiepal will only check for the cookies set by your domain (as defined in your config file). They will need to manually delete the cookies from the other domain. See my "Delete Cookies" doc in the how-to/library forum here.

Whatever domain you define in the config file... stick with it and make sure everyone uses the same to login etc.

People who are having trouble... tell them to go to the logout.php script like this:

http://www.yourcorrectdomain.com/ubbthreads/logout.php

And login again.

Hope those tips help.
Posted By: Erik_Rana Re: Cookie prefix? - 03/03/2003 11:01 PM
Okay, im going to try that with an user now go to the logout url and then try to login..

The domain mix was because the old server harddrive krashed real bad and we needed the forum to get up real quickly and did not know that it is not set a cookie prefix.
We did not use two domains at the same time, but there where a switch.
Maybe a default setting of the hostnameas cookie prefix on a inital install would help others not to get in this trouble?

The cookiepal cannot be rewritten to take the domain instead of subdomains then?
Or should i fix a ghost setup on the other domain so just the cookiepal can be run?
Since many users is not so capable to delete cookies manually Im hoping of an utillity like cookiepal..
Posted By: JoshPet Re: Cookie prefix? - 03/03/2003 11:15 PM
Well this has really nothing to do with the cookie prefix. That's just how the cookies are named. They are still assigned to the domain.

I'm not sure if the cookie script can be modified. I'm not the real cookie-fixing expert. I just am very familiar with the problems. I took a look at the code and it confused me.

But you'd have the same problem here if you tried to login at https://www.ubbdev.com/threads/php/login.php

Then clicked to https://www.ubbdev.com/threads/php/ubbthreads.php

You'd be logged out.

Here's something you might try. If you were to give a new unique cookie prefix.... then everyone would be logged out and everyone would have to log back in and get new cookies.

That might fix your problems. I think. Just tell people to update their bookmarks and don't try to login at old URL's etc...

That might help a great deal.
© UBB.Developers