Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Mike Bobbitt on May 26, 2004, 02:49:19 PM

Title: subdomain independent cookies and unqual DNS
Post by: Mike Bobbitt on May 26, 2004, 02:49:19 PM
You can call it a bug or you can call it poor DNS habits... I run http://Army.ca, and noticed that when I turned on subdomain independent cookies, the cookies were not set correctly. That is, they were set for army.ca, but the cookie name (I.E. SMFcookie10) was actually blank when the cookie was set.

This showed up as me having to re-log in at every visit.

I know I should technically be using www.army.ca instead,  but it still seems buggy that the cookie name disappears in this case. (I'm planning on using other server names such as gallery.army.ca, so I'd like to use subdomain independent cookies if possible...)


Cheers
Title: Re: subdomain independent cookies and unqual DNS
Post by: Grudge on May 26, 2004, 03:07:23 PM
I'm sure Unknown is the best guy to answer this once he returns from holiday. Just incase you don't get a useful response right now. I assume local cookies are off too?
Title: Re: subdomain independent cookies and unqual DNS
Post by: Mike Bobbitt on May 26, 2004, 03:20:49 PM
Yep, forgot to mention, but local cookies are turned off. My board isn't live yet, so I'd be happy to tinker and test as needed.
Title: Re: subdomain independent cookies and unqual DNS
Post by: [Unknown] on May 28, 2004, 03:25:55 AM
I can't promise coming from army.ca will work properly... it should, but I can see that having a problem.

However, I've never had any problems here - we use subdomain independent cookies, and this:

http://support.simplemachines.org/community/index.php

Should keep you logged in and everything.  It has always for me.

What browser are you using?  Do you have Mcafee Firewall, Norton Internet Security, or ZoneAlarm?  Anything like those?
(same questions for Grudge as you said he was having an issue too, but here.)

-[Unknown]
Title: Re: subdomain independent cookies and unqual DNS
Post by: Grudge on May 28, 2004, 03:32:31 AM
I don't use any software firewalls but I do have to go through a router to get onto the internet (it's a shared connection in our house). I'm using IE 6.
Title: Re: subdomain independent cookies and unqual DNS
Post by: [Unknown] on May 28, 2004, 04:07:26 AM
Can you try a different browser, such as Firefox which can be found here?

http://www.mozilla.org/products/firefox/why?

I hope it's not the router giving issues.  If you still have problems with Firefox, I can tell you how to get Firefox to tell you WHAT cookie is being set so you can debug it.

-[Unknown]
Title: Re: subdomain independent cookies and unqual DNS
Post by: Grudge on May 28, 2004, 04:33:17 AM
Will do this tonight cheers.

EDIT: This also happens at work for me, again on IE 6, so I don't think it can be the router. Either way I'll test this out properly tonight.
Title: Re: subdomain independent cookies and unqual DNS
Post by: Mike Bobbitt on May 28, 2004, 07:06:49 AM
I'm using firefox (also tested on IE). No funnies like ZoneAlarm to interfere with cookies. I can send the actual cookie created if it helps...
Title: Re: subdomain independent cookies and unqual DNS
Post by: [Unknown] on May 28, 2004, 11:08:54 PM
Yes, that might.  It should be set for the domain .simplemachines.org here... and the same for you domain. (".army.ca".)

-[Unknown]
Title: Re: subdomain independent cookies and unqual DNS
Post by: Grudge on May 29, 2004, 05:03:36 AM
I bumped the wrong thread yesterday. I PM'd you information about my cookies yesterday Unknown.

Cheers.
Grudge
Title: Re: subdomain independent cookies and unqual DNS
Post by: Mike Bobbitt on May 29, 2004, 08:07:06 AM
Hmmm, now when I turn on subdomain cookies, nothing gets set! I'll keep tinkering and see if I can reproduce the original complaint (or maybe it was just too late at night). Will post what I find...
Title: Re: subdomain independent cookies and unqual DNS
Post by: Mike Bobbitt on May 29, 2004, 08:08:08 AM
If I had to guess, I'd say that when your domain is army.ca, SMF cuts it down to a subdomain of .ca, which no respectable browser is going to allow. :)
Title: Re: subdomain independent cookies and unqual DNS
Post by: [Unknown] on May 29, 2004, 03:28:30 PM
Try www.army.ca.

-[Unknown]
Title: Re: subdomain independent cookies and unqual DNS
Post by: Mike Bobbitt on May 29, 2004, 05:20:24 PM
Yeah, using www.army.ca and subdomain cookies works just fine... So I could use forums.army.ca (for example) but it still seems to be incorrect behaviour for SMF to not set a cookie when I use army.ca...  ;D
Title: Re: subdomain independent cookies and unqual DNS
Post by: [Unknown] on May 29, 2004, 05:24:40 PM
I can't promise coming from army.ca will work properly... it should, but I can see that having a problem.

I didn't say it should have a problem, I said it might.

-[Unknown]