Using Vanilla Session Outside of Vanilla - External Session

2»

Comments

  • So do...

    $Configuration['Garden']['Cookie']['Name']  = 'Vanilla';
    $Configuration['Garden']['Cookie']['Path']   = '/';
    $Configuration['Garden']['Cookie']['Domain']   = 'http://example.com';
    

    and if I copy and paste that.... into the where I am running the script above in the forum? Do I have to put it anywhere else?

  • ShadowdareShadowdare Moderator
    edited October 2013

    Use example.com if you don't want the cookie to be available from sub-domains and use .example.com if you want the cookie to be available from sub-domains for $Configuration['Garden']['Cookie']['Domain'].

    These settings go in the config.php file in your Vanilla's /conf folder.

    Add Pages to Vanilla with the Basic Pages app

    gabessdsp
  • @Shadowdare said:
    Use example.com if you don't want the cookie to be available from sub-domains and use .example.com if you want the cookie to be available from sub-domains for $Configuration['Garden']['Cookie']['Domain'].

    These settings go in the config.php file in your Vanilla's /conf folder.

    So I copied these exact lines to the end of my config.php

    $Configuration['Garden']['Cookie']['Name'] = 'Vanilla';
    $Configuration['Garden']['Cookie']['Path'] = '/';
    $Configuration['Garden']['Cookie']['Domain'] = 'http://.crimsonlakemc.com';

    but the script you first provided me with is still not showing the user as logged in. I logged in and out several times

  • Don't put http:// in your cookie domain.

    Add Pages to Vanilla with the Basic Pages app

    gabessdsp
  • @Shadowdare said:
    Don't put http:// in your cookie domain.

    errr....now It's not letting me sign out :3

  • ShadowdareShadowdare Moderator
    edited October 2013

    That's one way to know that the new cookie settings are in effect. You have to clear the cookies of your forum from your web browser.

    Add Pages to Vanilla with the Basic Pages app

    gabessdsp
  • @Shadowdare said:
    That's one way to know that the new cookie settings are in effect. You have to clear the cookies of your forum from your web browser.

    IT WORKED!!!!!! :D Thank you SO much!

  • @Shadowdare said:
    That's one way to know that the new cookie settings are in effect. You have to clear the cookies of your forum from your web browser.

    Just one more question though. When I sign out the page with the script still thinks I am signed in for quite awhile. I can fix this my clearing my cache but is there anyway to remove the cookie when the user signs out so that it reacts instantly?

  • Nevermind that seems to be a problem on my part. I'll worry about that at a later time

  • ShadowdareShadowdare Moderator
    edited October 2013

    @gabessdsp said:
    Just one more question though. When I sign out the page with the script still thinks I am signed in for quite awhile. I can fix this my clearing my cache but is there anyway to remove the cookie when the user signs out so that it reacts instantly?

    The script sounds like it's reacting instantly, so it's the browser cache like you said. You just need to specify some HTML metatags to control the cache expiry of the page.

    Add Pages to Vanilla with the Basic Pages app

  • thank you so much Shadowdare , your post help me a lot

    hgtonightShadowdareUnderDog
  • peregrineperegrine MVP
    edited April 2014

    how about moving this to tutorials - it was hard to find or at least create a new tutorial in tutorials with info in this comment.

    It's pretty handy.

    @Shadowdare‌

    http://vanillaforums.org/discussion/comment/195082/#Comment_195082

    external session

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.