Skip to:
Content
Pages
Categories
Search
Top
Bottom

WordPress 2.9.2 and bbpress cookies integration.

  • Hello.

    I read http://www.wpmods.com/integrate-wordpress-bbpress and do all described thing, but had no success with cookies integration.

    Then I read forums, check all parameters, but cookies integration didn’t work.

    When I have searched for answer – I have tried to change my BB_AUTH_KEY = AUTH_KEY, BB_SECURE_AUTH_KEY=SECURE_AUTH_KEY etc. parameters in wp-config.php and bb-config.php on somthing simple (‘d’) — suddenly, cookie integration begin to work.

    I did several experiments and found that if keys too long – cookie integration don’t work. Keys with length 32 chars — still work, but keys with length 64 chars don’t work at all.

    May be this will helpful for somebody.

Viewing 25 replies - 1 through 25 (of 27 total)

  • Al
    Participant

    @al_bullit

    Jakshi, a sincere thank you.

    I had given up trying to make WP/BBP integration work, having tried everything I could find on-line to suggest how to fix things, but with no luck.

    However, your suggestion of halving my key lengths from 64 to 32 has it all working. Amazing.

    Cheers!

    Al


    Kevin Muldoon
    Member

    @kevin-muldoon

    Hi jakshi,

    I’m surprised you had this problem as I did the integration process several times and never had a problem with this. Not sure if this is something that is caused my a setting on a websites host or something similar. I’ve updated the article with your suggestion though so that others will know to try this solution :)

    Kevin

    Al – I glad that my investigation help somebody :)

    Kevin Muldoon – Thank you, may be it help some people that have trouble with integration. You article about integration very useful and clear. May be difference between my site and site that you setuped – My site has been upgraded from 2.1.x to 2.9.x during using and bbpress was upgraded from 0.9.x to 1.0.x, but you setup new sites.


    Kevin Muldoon
    Member

    @kevin-muldoon

    Yes it may have been a little different if you did the integration with older releases. The best thing to do is to upgrade WordPress to the latest version, then bbPress, and then do the integration. Rather than integrate the scripts and then upgrade them. :)

    O, I did integration with lastest releases wordpress (2.9.2) and bbpres (1.0.2), I just guess that long chain of previous upgrades can influence on bbpress integration with wordpress (may be database upgrades have some inaccuracy etc.)


    Al
    Participant

    @al_bullit

    I’m on an old, but continually updated, WP install with a fresh 1.0.2 BBPress install. I could always make a brand new WP 2.9 integrate with BBPress, but could never make the live site (the updated WP) work. I’d always known it to be something to do with the older WP, but had not found what. Still don’t know exactly what, but the shorter keys make it work.

    @Al compare make sure your wp-config.php is following the same layout as wp-config-sample.php

    I have a wp/bbp integration where I recently upgraded both from previous versions to wp 2.9.2 and bbp 1.0.2. I was able to get them to share accounts so you can login to both with the same passwords but I can’t get the cookie integration working at all. Logging into one doesn’t automatically log you into the other.

    I decided to do a fresh install of the latest versions of both to see if that would work but I’m having the exact same issue. I tried cutting the salts down to 32 characters as suggested above but still no luck.

    I installed the bbpress integration plugin in wp but that’s not helping either.

    I’m wondering if there is some incompatibility between wp 2.9.2 and bbp 1.0.2?

    This is on a dreamhost server, and it all worked well before I tried to upgrade.

    Check wp-config.php and bb-config.php closely. May be you forget something to do.

    Did you cut to 32 chars BB_AUTH_KEY = AUTH_KEY, BB_SECURE_AUTH_KEY=SECURE_AUTH_KEY in wp-config.php and bb-config.php?

    I have working cookie integration now.

    My wp-config.php (without comments and passwords)

    <?php

    define( ‘COOKIEPATH’, ‘/’ );

    define(‘DB_NAME’, ‘wordpress’);

    define(‘DB_USER’, ‘wpuser’);

    define(‘DB_PASSWORD’, ‘StrongPassword’);

    define(‘DB_HOST’, ‘localhost’);

    define(‘DB_CHARSET’, ‘utf8′);

    define(‘DB_COLLATE’, ‘utf8_general_ci’);

    define(‘AUTH_KEY’, ’32charsalphanumerickeys’);

    define(‘SECURE_AUTH_KEY’, ’32charsalphanumerickeys’);

    define(‘LOGGED_IN_KEY’, ’32charsalphanumerickeys’);

    define(‘NONCE_KEY’, ’32charsalphanumerickeys’);

    $table_prefix = ‘wp_’;

    define (‘WPLANG’, ‘ru_RU’);

    if ( !defined(‘ABSPATH’) )

    define(‘ABSPATH’, dirname(__FILE__) . ‘/’);

    require_once(ABSPATH . ‘wp-settings.php’);

    ?>

    My bb-config.php (without comments and passwords)

    <?php

    define( ‘COOKIEPATH’, ‘/’ );

    define( ‘BBDB_NAME’, ‘wordpress’ );

    define( ‘BBDB_USER’, ‘wpuser’ );

    define( ‘BBDB_PASSWORD’, ‘StrongPassword’ );

    define( ‘BBDB_HOST’, ‘localhost’ );

    define( ‘BBDB_CHARSET’, ‘utf8′ );

    define( ‘BBDB_COLLATE’, ‘utf8_general_ci’ );

    define( ‘BB_AUTH_KEY’, ’32charsalphanumerickeys’ );

    define( ‘BB_SECURE_AUTH_KEY’, ’32charsalphanumerickeys’ );

    define( ‘BB_LOGGED_IN_KEY’, ’32charsalphanumerickeys’ );

    define( ‘BB_NONCE_KEY’, ’32charsalphanumerickeys’ );

    $bb_table_prefix = ‘bb_’;

    define( ‘BB_LANG’, ‘ru_RU’ );

    ?>

    There are a lot mention about problem with cookie integration wordpress 2.9.2 and bbpress 1.0.2 .

    So you are one of the many :)

    My cookie keys match between the 2 configs. I didn’t have the COOKIEPATH definition in bbpress, only in wp, so I put that in but still no luck.

    I have wp installed in a sub-directory so my statement is: define(‘COOKIEPATH’, ‘/blogs/’);

    I just tried another test install without sub-directory and that won’t work either!


    Markus Pezold
    Participant

    @markus-pezold

    Hi together,

    in my working integration between WordPress and bbPress I’ve the following cookie keys matched:

    WordPress:

    define(‘AUTH_KEY’, ’32charsalphanumerickeys’);

    define(‘SECURE_AUTH_KEY’, ’32charsalphanumerickeys’);

    define(‘LOGGED_IN_KEY’, ’32charsalphanumerickeys’);

    define(‘NONCE_KEY’,’32charsalphanumerickeys’);

    define(‘AUTH_SALT’, ’32charsalphanumerickeys’);

    define(‘LOGGED_IN_SALT’, ’32charsalphanumerickeys’);

    define(‘SECURE_AUTH_SALT’, ’32charsalphanumerickeys’);

    bbPress:

    define( ‘BB_AUTH_KEY’, ’32charsalphanumerickeys’ );

    define( ‘BB_SECURE_AUTH_KEY’, ’32charsalphanumerickeys’ );

    define( ‘BB_LOGGED_IN_KEY’, ’32charsalphanumerickeys’ );

    define( ‘BB_NONCE_KEY’, ’32charsalphanumerickeys’ );

    define(‘BB_AUTH_SALT’, ’32charsalphanumerickeys’);

    define(‘BB_LOGGED_IN_SALT’, ’32charsalphanumerickeys’);

    define(‘BB_SECURE_AUTH_SALT’, ’32charsalphanumerickeys’);

    Evtl. you need the Salt Keys too?

    Without the Salt Keys my old installation doesn’t work, in my new (fresh) installation it worked without the Salt Keys.

    Markus

    http://www.bbp-forever.de (beta)

    I created my wp-config.php and bb-config.php with examples from wp-config-sample.php and bb-config-sample.php .

    After every upgrade I check for changes in wp-config-sample.php and bb-config-sample.php .

    So, as I understand, AUTH_SALT and others *_SALT don’t needed anymore.


    huafeihua116
    Member

    @huafeihua116

    Thanks jakshi!


    Ashfame
    Participant

    @ashfame

    I have working setups with 64length keys. Nicely integrated with only the issue of bbPress dashboard redirection when logged in from WordPress side (users don’t need have access to bbPress dashboard, so its just for admin & mods). Other than this the integration works flawlessly for me. Both simple and deep integration.

    @jakshi

    AFAIK, salts were never included in sample config file, if they are not present they are generated internally and then saved.

    I just tried installing on a different host, gator as opposed to dreamhost but it still doesn’t work.

    I find that when you logout of one it does automatically log you out of the other. Also when you log in into one when already logged into the other it logs you out of the other, so effectively you can only be logged into one at a time.

    When looking at the cookies that are set I see that WP sets 2:

    wordpress_ada20ea306634ad9f83718aa733fc431

    wordpress_logged_in_ada20ea306634ad9f83718aa733fc431

    When logging into BBP it only sets 1:

    wordpress_logged_in_ada20ea306634ad9f83718aa733fc431

    I notice in WP the values for wordpress_ and wordpress_logged_in_ don’t match, are they supposed to be different?

    If already logged in with WP and then logging in with BBP I notice that the value of wordpress_logged_in_ changes. I’m sure that’s why if you go back to WP then you find yourself logged out.

    As far as I can tell the value set for wordpress_logged_in_ by WP is not recognized by BBP so you are not automatically logged in to it. I wonder why that is if I’ve followed all the cookie integration steps?

    @huafeihua116

    Not at all.

    @ashfame

    I agree with “salts were never included in sample config file”, When I do integrations – I get salts values from options.

    I and many other people will very happy if developers of bbpress says us what difference between your good working wordpress and bbpress cookie integration, and their wordpress and bbpress cookie integration that don’t work.

    But for now – it’s still unresolved issue :)


    Ashfame
    Participant

    @ashfame

    You guys are missing out something. I will come up with something to help once I am free from my schedule.

    May be we(I) are missing something.

    How do you think – what I should missing to have trouble with 64 bit keys and haven’t such trouble with 32 bit keys?

    When you have time, I can afford you data that you need (answer questions about setup steps, configs, screenshots of settings, part of DBs etc.)

    -wp-config.php file does NOT have “?>” at the end.

    -make sure your hosting company is using php5. They might have it but not using it. Search on google “use php5 [hosting company's name]” and you will find a tutorial. It usually means adding something to you .htaccess file.

    -blank screen means it 98% time is a plugin that is activated.

    If you STILL having trouble you can email me with your information.


    Ashfame
    Participant

    @ashfame

    @gerikg

    having ?> at the end is not specific to wp-config.php

    It can be removed from any php file and its something debatable

    I am still unsure about the PHP5 thing you mentioned. I would need an explanation to believe in it.

    And I shoot you an email using your contact form. Did you get that?


    zaerl
    Participant

    @zaerl

    It can be removed from any php file and its something debatable

    Also the official documentation suggests that omitting the ?> at the end of the PHP file is helpful in some cases.

    @ashfame, I emailed you. Yes I have all the WP files sent to me.

    I get hosting from 1and1. For me to use php5 I have to put a line “AddType x-mapp-php5 .php” into the htaccess file when I don’t have that line I get a 500 error. On top of that WP one click update or install doesn’t work. I don’t know how to prove it to you.

    Concerning to my issue – I am using php 5.2.13 (I know this exactly, because I’m self hosting my blog on worpdress :) )

    I’ll try to remove ?> in the end of the wp-config.php.

    May be it’s significant for cookie inegration.

    jakshi, just for argument sake can you try eight keys instead? https://api.wordpress.org/secret-key/1.1/salt

    @gerikg

    I tried and When I inserted this keys (from https://api.wordpress.org/secret-key/1.1/salt) in my config files, cookie integration don’t work.

    Also I checked with salt (from https://api.wordpress.org/secret-key/1.1/salt) and my old 32 chars keys – and integration still didn’t work.

    When I had returned short solt keys values (32 chars length) and my short 32 chars keys then cookie integration began to work.

    Also I have noticed that in the http://jakshi.org.ua/wp-admin/options.php lack of secure_auth_salt keys, all other salt keys exist.

Viewing 25 replies - 1 through 25 (of 27 total)

You must be logged in to reply to this topic.