cookie problems for multi domains

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SkuZZy
    Senior Member
    • Aug 2002
    • 447

    cookie problems for multi domains

    I'm running into problems with cookies. I have 3 domains pointing to my forums and when I leave the cookie path blank, it doesn't let you logout. But if I put the cookie path on just one of the domain names, then obviously, it wont let you stay logged in on the other 2 domain names. The three domains are:

    The oldest and largest Blizzard forum and fan community. Overwatch, Diablo, World of Warcraft, and StarCraft forums.

    Buy the domain name Battlenetwork.com and launch your business with a premium domain and a high quality logo.



    ... so what do I put for the cookie path? can I just put ".com" would that work?

    Thanks for the help,
    SkuZZy
    -
    Visit the Web Scripts Directory @ http://www.scriptz.com
    -
    PHP, CGI, Perl, ASP, JavaScript, CFML, Python and more!

    -
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 74152

    #2
    No... If you want to properly handle cookies, you will have to redirect everyone to one domain regardless of their entry point. There was a hack for this posted on vBulletin.org, I believe. It consists of one line you put into your global.php file.

    The solution has also been posted in a similar thread on SitePointForums.com.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    • SkuZZy
      Senior Member
      • Aug 2002
      • 447

      #3
      Originally posted by Wayne Luke
      No... If you want to properly handle cookies, you will have to redirect everyone to one domain regardless of their entry point. There was a hack for this posted on vBulletin.org, I believe. It consists of one line you put into your global.php file.

      The solution has also been posted in a similar thread on SitePointForums.com.
      So, is it possible to use multiple domains or not?

      - SkuZZy
      -
      Visit the Web Scripts Directory @ http://www.scriptz.com
      -
      PHP, CGI, Perl, ASP, JavaScript, CFML, Python and more!

      -

      Comment

      • Wayne Luke
        vBulletin Technical Support Lead
        • Aug 2000
        • 74152

        #4
        In the Admin Options? NO. Cookies do not work like that. You will need to redirect your additional domains to a single location using htaccess, or some other means if you want to use a single cookie only.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API

        Comment

        • George L
          Former vBulletin Support
          • May 2000
          • 32996
          • 3.8.x

          #5
          Re: cookie problems for multi domains

          Originally posted by SkuZZy
          I'm running into problems with cookies. I have 3 domains pointing to my forums and when I leave the cookie path blank, it doesn't let you logout. But if I put the cookie path on just one of the domain names, then obviously, it wont let you stay logged in on the other 2 domain names. The three domains are:

          The oldest and largest Blizzard forum and fan community. Overwatch, Diablo, World of Warcraft, and StarCraft forums.

          Buy the domain name Battlenetwork.com and launch your business with a premium domain and a high quality logo.



          ... so what do I put for the cookie path? can I just put ".com" would that work?

          Thanks for the help,
          SkuZZy
          which domain is the real domain for the forums ? choose 1 domain and you can in headerinclude template at very bottom add
          Code:
          <base href"=thatchosendomain.com">
          while leaving all cookie domain blank and path as /

          of course the user then would need to login into the chosendomain and browse using chosen domain
          :: Always Back Up Forum Database + Attachments BEFORE upgrading !
          :: Nginx SPDY SSL - World Flags Demo [video results]
          :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

          Comment

          • SkuZZy
            Senior Member
            • Aug 2002
            • 447

            #6
            I fixed this so all domains names point to http://www.battleforums.com now. I'm still running into cookie problems though and I don't know why. I have the cookie domain set at:

            .battleforums.com

            but it won't let me or any of my other users logout... I was told earlier this is a problem with IE, but logout works fine for me on other forums, including vbulletin.com and I just upgraded to IE 6.0 SP1 too... any suggestions on what could be causing these logout problems?

            Thanks,
            SkuZZy
            -
            Visit the Web Scripts Directory @ http://www.scriptz.com
            -
            PHP, CGI, Perl, ASP, JavaScript, CFML, Python and more!

            -

            Comment

            • Steve Machol
              Former Customer Support Manager
              • Jul 2000
              • 154488

              #7
              If you have changed the cookie domain then your users will need to delete the cookies for your domains (possibly manually) in order to get things working right again.
              Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
              Change CKEditor Colors to Match Style (for 4.1.4 and above)

              Steve Machol Photography


              Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


              Comment

              • kippesp
                Senior Member
                • Jan 2002
                • 241

                #8
                Be sure to delete the correct cookies. This would include those cookies of the form "mydomain.com" and "www.mydomain.com."

                We had the same issue after implementing similar redirects.
                Cygwin - all the tools to make Windows complete (cvs, vim, diff, grep, gcc, ssh, ...)

                Comment

                • MartynJ
                  Senior Member
                  • May 2002
                  • 123

                  #9
                  A similar problem...

                  I'd like to have two sites, one is a conventional website (but in PHP where users can vote/submit reviews etc) which is linked to a vB forum on another domain. It would be nice if a user could log in at either the forums or the website, and then be logged in via cookies at the other (though I suppose this requires the users to have cookies enabled) Is there any way of doing that?

                  EDIT: I mean, something like .NET passport, it seems universal in that you log in one place and all the different passport sites know you.

                  Comment

                  • poi@nwdnb
                    New Member
                    • Sep 2002
                    • 12

                    #10
                    Originally posted by MartynJ
                    I'd like to have two sites, one is a conventional website (but in PHP where users can vote/submit reviews etc) which is linked to a vB forum on another domain. It would be nice if a user could log in at either the forums or the website, and then be logged in via cookies at the other (though I suppose this requires the users to have cookies enabled) Is there any way of doing that?

                    EDIT: I mean, something like .NET passport, it seems universal in that you log in one place and all the different passport sites know you.
                    This is exactly what i am trying to do. Alas, the main site runs with ASP, so i am basically just trying to find out the names of the cookies and so on.

                    I will set up the ASP login forms to just submit to the vBulletin PHP scripts, so all the ASP scripts will need to do is check for the "isloggedin" and so on cookies.

                    I just dont know what these cookies are. Can anyone help me?

                    Ah yes, also, my domains are the same. Well, theres forum.mydomain.co.uk and the main site on *.mydomain.co.uk .

                    Comment

                    • poi@nwdnb
                      New Member
                      • Sep 2002
                      • 12

                      #11
                      Well i solved this, i have got ASP to read the vBulletin cookies.

                      I'm now having this problem with the users not being able to log out, since i have changed my cookie domain! (to .mydomain.co.uk)

                      And if i set back to the original cookie domain (blank, which is the same as .forum.mydomain.co.uk i assume), then i cannot access these cookies from the main site..

                      I guess i'm going to have to get the users to delete all their cookies .. ?

                      Comment

                      • Steve Machol
                        Former Customer Support Manager
                        • Jul 2000
                        • 154488

                        #12
                        Yes, you'll need your users to delete their cookies.
                        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                        Change CKEditor Colors to Match Style (for 4.1.4 and above)

                        Steve Machol Photography


                        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                        Comment

                        • poi@nwdnb
                          New Member
                          • Sep 2002
                          • 12

                          #13
                          I think i found a workaround.

                          I am trying to get users to delete "forum.nwdnb.co.uk" cookies, so they can use the new Cookie Domain cookies of just "nwdnb.co.uk".

                          I have updated my Cookie Domain setting to ".nwdnb.co.uk".
                          I have put in my phpinclude file, setcookie() functions with blank values (for the purpose of deleting cookies) for each of the cookies that vBulletin stores (bbuserid etc), but with the cookiedomain parameter to this setcookie() function as the OLD "forum.nwdnb.co.uk" domain.

                          I think this has the effect, of removing all the old forum.nwdnb.co.uk cookies, and then the plain "nwdnb.co.uk" cookies seem to be created with no problems (user doesnt even seem to have to log back in??)

                          I dont know if this is a bad method of doing things, and i suspect it will only work in specific cases like mine where you are trying to remove a subdomain reference in the cookies.

                          I'm no expert but it seems to work. Any comments?

                          Comment

                          • poi@nwdnb
                            New Member
                            • Sep 2002
                            • 12

                            #14
                            Anyone? I Hope i'm not doing any damage

                            Comment

                            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                            Working...