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

XF 1.3 Can't Logout, and users can't activate accounts

Discussion in 'Troubleshooting and Problems' started by whastings, Apr 26, 2014.

  1. whastings

    whastings Member

    I just set-up a Xenforo forum and I noticed that I can not logout of my account on the forum. It works fine int he CP, but I can't logout on the forum. If I clear my browsers cache I will be logged out and I can log back in just fine, but still can't logout afterwards.

    The other issue is that the link sent in the activation email when clicked gives me the error "Your account could not be confirmed."

    I am not sure whats causing these issue and I am also not receiving and error logs.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    What is the exact error message when clicking the email confirmation link?

    Have you confirmed the Board URL in the ACP is correct?
     
  3. whastings

    whastings Member

    The Board URL in the ACP appears to be correct,

    here is an image of the error:
    [​IMG]
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Re: logout problem

    1) You might be viewing a cached page which shows you being logged in when you actually aren't.

    2) As a last resort you can add this code to your library/config.php file:

    Code:
    $config['cookie'] = array(
    	'prefix' => 'xf_',
    	'path' => '/',
    	'domain' => ''
    );
    
    These are the default cookie settings in XF. If you change the prefix then it will invalidate all old cookies and forcibly log everyone out.
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    What are your cookie settings in library/config.php?
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Incidentally, if you have played with your cookie settings before then it is possible to have multiple cookies in play which can cause problems logging out. Changing the prefix is good way to resolve that as well.
     
  7. whastings

    whastings Member

    I never edited the cookie settings.

    I did open up the config file and noticed it is incomplete. Could one of you give me the default config.php?
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    This is the default, with no database information included:
    Code:
    <?php
    
    $config['db']['host'] = 'localhost';
    $config['db']['port'] = '3306';
    $config['db']['username'] = '';
    $config['db']['password'] = '';
    $config['db']['dbname'] = '';
    
    $config['superAdmins'] = '1';

    However, as Jake said, you can add a cookie prefix like so:
    Code:
    <?php
    
    $config['db']['host'] = 'localhost';
    $config['db']['port'] = '3306';
    $config['db']['username'] = '';
    $config['db']['password'] = '';
    $config['db']['dbname'] = '';
    
    $config['superAdmins'] = '1';
    
    $config['cookie'] = array(
    'prefix' => 'xenforo_',
    'path' => '/',
    'domain' => ''
    );
     
  9. whastings

    whastings Member

    Alright so I did add the cookie settings, and changed the prefix. It did forcefully log me out, but did not correct the issue.
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    I'm not sure what is causing this.

    Please open a ticket with ACP log in details so we can investigate.
     
  11. whastings

    whastings Member

    Will do, I messed with it for a while and came here stumped.
     

Share This Page