Skip to:

Cookie Hell: WPMU + BBPress = bloodshot eye balls

  • Ok… Let me start off by saying I’m not your “average” user seeking help. I’ve spent the last 2-3 hours combing this forum and trying almost every combination of cookie configurations and tweaking.

    My site is setup like this:

    This is what I have thus far:

    In my bbpress config.php

    $bb->cookiedomain = '';
    $bb->cookiepath = '/';
    $bb->sitecookiepath = '/';

    In my wpmu wp-settings.php around line 245

    if ( !defined('COOKIEPATH') )
    define('COOKIEPATH', '/' );
    if ( !defined('SITECOOKIEPATH') )
    define('SITECOOKIEPATH', '/' );
    if ( !defined('COOKIE_DOMAIN') )
    //define('COOKIE_DOMAIN', '.' . $current_site->domain);
    define('COOKIE_DOMAIN', '');

    Of course I replaced “” with my actual domain.

    The result is I get a total of 4 cookies when I login into both sites.

    Both sets are identical except expiration. (I even edited the expiration date with no avail, apparently bbpress is a full year and day off)

    the cookie properties look like this:

    website			name			path		secure		expires			value
    bbpress wordpresspass / no Mar 03, 2008 long_hash wordpressuser / no Mar 03, 2008 test

    wpmu wordpresspass / no Mar 04, 2007 long_hash (same as the other) wordpressuser / no Mar 04, 2007 test

    The only difference is the expiration date. As you can see bbpress has an issue with the date.

    Perhaps I need sleep, or I don’t understand how the cookies are supposed to work. But I’m beat.. I can’t battle it anymore tonight.

    I’m going to go get some sleep. Perhaps I’ll be able to figure it out from a fresh approach.

    Any suggestions would be greatly appreciated.



Viewing 7 replies - 1 through 7 (of 7 total)
  • Steven,

    I not sure of the ‘exact’ best procedure of combining bbPress and WPMU, but these are some users that have it going:

    It is a little different with WPMU as the table structures are a little different, but those posts seem to most likely have the key. Integrating with normal WP is much easier.


    Thanks for the heads up Trent. Unfortunately those mostly focus integration of user databases etc. Which I have already done.

    Perhaps I’ll take a look at how each application is looking for the cookies. There might be a clue in there.

    It seems most people have the forum in a sub directory of wp,.. which makes things much easier.

    But what I don’t understand is,.. the cookies are IDENTICAL… why doesn’t it work?

    It will still let different cookies if you don’t have them ‘integrated’ for the login from the config.php. That is why I was leading you towards those articles. I am sure being an WPMU user you are fully aware of working with complex issues and I didn’t want to try and ‘dumb it down’ too much. In terms of the cookies issue, I have had plenty of problems moving things around and changing structures to know that the ‘WordPress Integration’ under the bbPress Documentation is the best when bbPress is in a directory inside WordPress, but not always!

    If you let me know how you have it setup and what you have in your wp-config.php and config.php for cookie and integration stuff, I might be able to assist more. I just know that if you already installed bbPress and it is using bb_users versus wp_users, it might be harder to get the cookies working (at least in my experience)..


    I fixed it! o/

    Remember how the cookies “looked” identical?

    Well they weren’t.

    The cookies created by bbpress added the hash to the end of the cookie name.

    Both Safari and Camino didn’t reveal this, but Flock did. I was using these other browsers as a testing platform because I needed to clear cookies in between each test.

    I added:

    $bb->usercookie = 'wordpressuser';
    $bb->passcookie = 'wordpresspass';

    To my bbpress config to solve the problem. (which I found on one of the links you sent me)

    I actually like the idea of the cookie name including the hash. Isn’t this more secure? Correct me if I’m wrong, but wouldn’t this make it near impossible for another site to read that cookie?

    Thanks for your help Trent!

    Glad you got it working! Marking the topic as resolved!


    My WP cookies have a hash added to the end of their name (using WP 2.1), this hash is the same as the password hash. Did you delete this/edit it in WP?



    FofR, he’s trying to integrate WPMU, not WP, with BBpress

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