Skip to:
Content
Pages
Categories
Search
Top
Bottom

Cookies in WP and BBpress only works on logout

  • Hi!

    I´ve tried a WordPress and BBpress integration and it works just fine, i´ve have added all the cookie information in both config files of WP and BB press but it still doesnt work on login, only on logout.

    My WP:

    define(‘AUTH_KEY’, ‘halmstad’);

    define(‘SECURE_AUTH_KEY’, ‘halmstad’);

    define(‘LOGGED_IN_KEY’, ‘halmstad’);

    define(‘NONCE_KEY’, ‘halmstad’);

    define(‘SECRET_KEY’, ‘halmstad’); // Change this to a unique phrase.

    define(‘COOKIE_DOMAIN’, ”);

    define(‘COOKIEPATH’, ‘/’);`

    BB:

    define(‘BB_SECRET_KEY’, ‘halmstad’); // Change this to a unique phrase.

    $bb->wp_siteurl = ‘http://www.domain.se/’;

    $bb->wp_home = ‘http://www.domain.se/’;

    $bb->wp_table_prefix = ‘wp_’;

    $bb->custom_user_table = ”;

    $bb->custom_user_meta_table = ”;

    $bb->authcookie = ‘wordpress_456c71223b3bb9958349ec3d65b850f6’;

    $bb->cookiedomain = ”;

    $bb->cookiepath = ‘/’;

    $bb->sitecookiepath = ‘/’;

    Can anyone spot the problem?

Viewing 6 replies - 1 through 6 (of 6 total)
  • In bb-config.php

    define('BB_AUTH_KEY', 'WP's AUTH KEY halmstad');
    define('BB_SECURE_KEY', 'WP's SECURE KEY halmstad');
    define('BB_LOGGED_IN_KEY', 'WP's LOGGED IN KEY halmstad');

    Also make sure you have the salts:

    define('BB_AUTH_SALT', 'WP's AUTH SALT');
    define('BB_LOGGED_IN_SALT', 'WP's LOGGED IN SALT');

    And that you have these defined:

    $bb->secure_auth_cookie = 'wordpress_sec_456c71223b3bb9958349ec3d65b850f6';
    $bb->logged_in_cookie = 'wordpress_logged_in_456c71223b3bb9958349ec3d65b850f6';

    Personally, I set my cookie domain to .domain.se for both WP and BB.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Firstly, what versions of WP and BBP are you using?

    Hi all

    I have the same problems with wp 2.7 and bbpress 1.0.6 alpha, if I login in wordpress it logout in bbpress and viceversa.

    I have put in wp-config and bb-press the same auth key – secure key and logged in key

    the salts too in installation of bbpress (i have take that from wp-admin/options)

    and then i have added in wp-config.php

    define(‘COOKIE_DOMAIN’, ”);

    define(‘COOKIEPATH’, ‘/’);

    and in the bb-config.php

    // Start integration speedups

    // WordPress database integration speedup

    $bb->wp_table_prefix = ‘wp_’;

    $bb->user_bbdb_name = ”;

    $bb->user_bbdb_user = ”;

    $bb->user_bbdb_password = ”;

    $bb->user_bbdb_host = ”;

    $bb->user_bbdb_charset = ”;

    $bb->user_bbdb_collate = ”;

    $bb->custom_user_table = ”;

    $bb->custom_user_meta_table = ”;

    // WordPress cookie integration speedup

    $bb->wp_siteurl = ‘http://mydomain’;

    $bb->wp_home = ‘http://mydomain’;

    $bb->cookiedomain = ”;

    $bb->cookiepath = ‘/’;

    $bb->authcookie = ‘wordpress_66640defe2164fce559625e843fb6d04’;

    $bb->secure_auth_cookie = ‘wordpress_sec_66640defe2164fce559625e843fb6d04’;

    $bb->logged_in_cookie = ‘wordpress_logged_in_66640defe2164fce559625e843fb6d04’;

    $bb->admin_cookie_path = ‘/forum/bb-admin’;

    $bb->core_plugins_cookie_path = ‘/forum/bb-plugins’;

    $bb->user_plugins_cookie_path = ‘/forum/my-plugins’;

    $bb->sitecookiepath = ‘/’;

    $bb->wp_admin_cookie_path = ‘/wp-admin’;

    $bb->wp_plugins_cookie_path = ‘/wp-content/plugins’;

    // End integration speedups

    Any Solutions? Really Thanks

    I have found the problem! When i have pasted the auth key etc in wp-config.php I have been pasted the BB_AUTH_KEY etc

    Be sure that in wp-config.php there is that :

    define(‘AUTH_KEY’, ‘x’);

    define(‘SECURE_AUTH_KEY’, ‘x’);

    define(‘LOGGED_IN_KEY’, ‘x’);

    define(‘NONCE_KEY’, ‘x’);

    and not:

    define(‘BB_AUTH_KEY’, ‘x’);

    define(‘BB_SECURE_AUTH_KEY’, ‘x’);

    define(‘BB_LOGGED_IN_KEY’, ‘x’);

    define(‘BB_NONCE_KEY’, ‘x’);

    i had the same issue, but it turned out that bbpress had not written any of the key info to bb-config.php, despite me specifying this on installation. i added this manually and it worked:

    define(‘BB_AUTH_KEY’, ‘wp-auth-key’);

    define(‘BB_SECURE_AUTH_KEY’, ‘wp-secure-auth-key’);

    define(‘BB_LOGGED_IN_KEY’, ‘wp-logged-in-key’);

    define(‘BB_NONCE_KEY’, ‘wp-nonce-key’);

    define(‘BB_SECRET_KEY’, ‘wp-secret-key’);

    define(‘BB_AUTH_SALT’, ‘(wp-auth-salt’);

    define(‘BB_LOGGED_IN_SALT’, ‘wp-logged-in-salt’);

    the first four are in wp-config.php and the second two are in the options page of the wordpress admin menus.

    oh, this is with bbpress 1.0 and wordpress 2.7

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar