Skip to:
Content
Pages
Categories
Search
Top
Bottom

Cookies (staying logged in between wp and bb)


  • wilcosky
    Participant

    @wilcosky

    Similar posts have been made about this subject, and I’ve read the documentation, but no matter what I do I can’t get the cookies to work. I’m sure you hate working with newbies like me because we’re always like, “gah, i can’t get anything to work” but, please, I don’t want to keep tweaking it because I don’t want to mess anything up… One solution here at this forum says to go into the wp_settings.php file and change something… do things like that have be to done, or is there an easier way? By the way, I did actually do that… I went into the wp_settings and changed that cookie_domain line from false to ‘.myurl.com’, if you know what I’m talking about… well, that tweak didn’t work for me either.

    I just want to be able to log into my blog, then go to my forum and still be logged in. Or log into my forum and go to my blog and still be logged in, then also be able to successfully log out from either location.

    I put

    define(‘COOKIE_DOMAIN’, ”);

    define(‘COOKIEPATH’, ‘/’);

    in my wp config and it is also in my bb press config.

    Now, some posts here say that for the cookie_domain, you have to actually put your domain, like:

    define(‘COOKIE_DOMAIN’, ‘.myurl.com’);

    is this true?

    If someone has the time and successfully has cookies working properly between their wordpress blog and bbpress forum, could you help me out?

    I’ve stayed up many nights trying to get this to work just right… it’s sad :( Whats weird is, when I first did the integration it worked BUT I couldn’t log out, so since then I’ve been changing things to fix that, but now, I’m back to square one. I can log into my forum. then, I can log into blog, and I can log out of both with the same username and password, but again, if I log into one and go to the other, I’m not logged in.

    I’ve just seen a few different posts and all the posts recommend doing different things. Then the actual documentation of course just says to use the built in integration feature in bbpress, which I used. Since there are so many different posts offering different solutions, can any one give me a step by step fix for this?

Viewing 5 replies - 1 through 5 (of 5 total)

  • _ck_
    Participant

    @_ck_

    Note the names of the settings in bbPress and WordPress is slightly different. Also, never, ever, edit bb-settings.php, what you want is bb-config.php on the bbpress side and wp-config.php on the WordPress side.

    Follow ALL the steps here and you’ll get cookie integration in just a few minutes:

    https://bbpress.org/forums/topic/wordpress-and-bbpress-integration-101#post-17410

    Note step #8 is where you edit wp-config.php, the rest are for bb-config.php

    Hello! I am having the same problem. I have successfully integrated my blog (wp2.5) with bbpress (0.9.0.2) using a single database and I even tweaked the theme to match my blog (woo-hoo!). However, even after following all the steps listed in the Integration-101 post (which was very helpful for integration, btw), I am having problems with cross-platform cookie-based login.

    I can log in to my blog, yet I’ll navigate to the forum and not be logged in. I can then log into the forum, yet navigate to the blog and I’ll be logged out back there. They’re obviously connected, since logging into one affects the other… and the user data is pulled from a single database.

    The bbpress settings all looked right from the admin panel and successfully found the information from installation so I tried manually setting the options (as described in the 101) in wp-config and bb-config – both ways, I get the same result. Logging into one kicks me out of the other.

    Any ideas? I’ve been plunking around for hours with this, and it seems like it should be something very simple. You can see the live site here: http://onehigherpower.com

    TIA for any help you can provide!


    wilcosky
    Participant

    @wilcosky

    Ok, I followed the steps. It’s still not working for me. I log in at my forum, then go to my blog, and it will say “please log in again” so it’s like it recognizes that I logged in at the forum, because it’s saying please log in again, meaning, we know you were logged in, but, now you’re not anymore so log in again.

    Having said all of that… I also did the backwards integration. I had the bbpress forum, then later got wordpress. I also did the “full” integration method which you (_ck_) do not recommend. But, the damage is done. I’m not going to uninstall and re-install anything… it is what it is.

    My members will just have to log in at my forum, and if they want to log into my blog, they’ll just have to enter in their username and password again, it’s not going to kill them, it takes an extra 5 seconds. So, I’m not worried about it anymore. At least my members can use the same username and password.

    I’m going to call this topic resolved. Because I got my answer. Since I did the backwards full integration method, the ability to stay logged in, isn’t going to work, unless I pay a professional to fix it.

    Hah! I won’t quit so easily, even if it simple for users to log in twice… but, how annoying!

    There is certainly something wrong with the cookie… but I’ve got the right wp cookie hash, and verified that bbpress picks it up naturally. I’ve got the secret keys with really simple text strings (for now), so I know they’re OK. I’ve verified the wp database secret is correct in the bbpress install. I’ve got COOKIE_DOMAIN defined as ‘.mysite.com’, and COOKIEPATH and SITECOOKIEPATH set as ‘/’ in my wp-config. I’ve got all 13 bb-> items listed in the 101 set correctly in my bb-config, with cookiedomain set to ‘.mysite.com’, and cookiepath and sitecookiepath set to ‘/’. My blog is in the web root folder (mysite.com) and the forum is in a subfolder (mysite.com/forums). My blog was established before bbpress was installed.

    This must be something simple, and I’m just so frustrated that I’m missing it. Do I have to do something different with the cookie path – i.e. define it as the subfolder or something??

    Thanks for any help!

    Well… apparently, the hangup is in using the “wizard” installation (which results in some silly “duplicate table” error regarding wp_users – users_nicename).

    My fix was to perform a clean install, without checking the option for integration during the install ‘wizard.’ Once I was in with a standalone version, I went to the Forum admin page – wordpress integration settings. I input the WP URL twice, the secret from WP and the user table prefix. Added the two lines suggested for wp-config.php and bada-bing… that did it.

    Hope this helps someone else out there. :-)

    Used WP 2.5 & 2.5.1 – bbPress 0.9.0.2

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