1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XenForo in Dev/Staging/Production Environments

Discussion in 'XenForo Pre-Sales Questions' started by robdog, Jan 26, 2011.

  1. robdog

    robdog Well-Known Member

    Has anyone set this up successfully yet?

    I am having session issues going from 1 environment to the next. (getting logged out in the admin)
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Your two forums are probably stepping on each other's cookies. Two options:

    1) Install one of the forums on a subdomain. That will separate the cookies.

    2) Edit the cookie settings of one of the forums by adding this code to the library/config.php file:

    Code:
    $config['cookie'] = array(
    	'prefix' => 'xf_',
    	'path' => '/',
    	'domain' => ''
    );
    
    It is enough to change the prefix. For example:

    Code:
    $config['cookie'] = array(
    	'prefix' => 'xfdev_',
    	'path' => '/',
    	'domain' => ''
    );
    
     
  3. robdog

    robdog Well-Known Member

    Did this, but I am still getting issues with logging in. :(

    I basically deployed everything from my local environment to staging. (files and DB) I was hoping that I didn't have to do a clean install and copy template edits 1 at a time. (at least for the initial installation)

    I guess now would be a good time to document what needs to change when moving an install through the development environments. (Within the file structure and database)

    Also, the forum is on a subdomain.

    Local: local.forums.domain_name.com
    Staging: staging.forums.domain_name.com
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    This certainly sounds like a cookie scope problem. Setting a different prefix should prevent conflicts.

    Are the two forums online where I can register and try to reproduce the problem?
     
  5. robdog

    robdog Well-Known Member

    You will not be able to get access to the local environment, but I can give you access to staging. However, I think the test would not work out as well since you don't get to access both environments.

    I will be checking a few additional things out. If it keeps happening, I might do a clean install on staging and export/import just the style and see if that helps.
     

Share This Page