Skip to:
Content
Pages
Categories
Search
Top
Bottom

wp integration cookie does not work

  • Hello,

    I integrated wordpress Version 2.8.6 with bbpress Version 1.0.2

    My user table is correctly shared, couse i can login on both.

    When I switch from wordpress to bbpress, I am nog logged in, if i log in on bbpress i get logged out on wordpress.

    Does any one know what i did wrong ?

Viewing 22 replies - 26 through 47 (of 47 total)
  • I’ve been two days trying to integrate WP 2.9.1 and BBPress 1.0.2.

    I’ve tried everything in this forum and the wp.org forum. Read and applied every tip.

    So now I’m posting here for help.

    I am simply trying to integrate the logins.

    the blog is site.com and the forum is site.com/foro

    I followed gerikg’s steps with no luck.

    my wp-config looks like this:

    <?php
    define('WP_CACHE', true);
    // ** MySQL settings ** //
    define('DB_NAME', '*****'); // The name of the database
    define('DB_USER', '*****'); // Your MySQL username
    define('DB_PASSWORD', '*****'); // ...and password
    define('DB_HOST', '*****'); // 99% chance you won't need to change this value
    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');
    /* AUTH KEYS */
    define('COOKIEPATH', '/' );
    define('AUTH_KEY', 'GENERATED1');
    define('SECURE_AUTH_KEY', 'GENERATED2');
    define('LOGGED_IN_KEY', 'GENERATED3');
    define('NONCE_KEY', 'GENERATED4');
    define('AUTH_SALT', 'GENERATED5');
    define('SECURE_AUTH_SALT', 'GENERATED6');
    define('LOGGED_IN_SALT', 'GENERATED6');
    define('NONCE_SALT', 'GENERATED6');
    $table_prefix = 'wp_';
    /* That's all, stop editing! Happy blogging. */
    if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');
    require_once(ABSPATH . 'wp-settings.php');
    ?>

    my bb-config looks like this:

    <?php
    // ** MySQL settings ** //
    define('BBDB_NAME', '*****'); // The name of the database
    define('BBDB_USER', '*****'); // Your MySQL username
    define('BBDB_PASSWORD', '*****'); // ...and password
    define('BBDB_HOST', '*****'); // 99% chance you won't need to change this value
    define('BBDB_CHARSET', 'utf8');
    define('BBDB_COLLATE', '');
    <p>/* AUTH KEYS */
    define('COOKIEPATH', '/' );
    define('BB_AUTH_KEY', 'GENERATED1');
    define('BB_SECURE_AUTH_KEY', 'GENERATED2');
    define('BB_LOGGED_IN_KEY', 'GENERATED3');
    define('BB_NONCE_KEY', 'GENERATED4');
    define('BB_AUTH_SALT', 'GENERATED5');
    define('BB_SECURE_AUTH_SALT', 'GENERATED6');
    define('BB_LOGGED_IN_SALT', 'GENERATED6');
    define('BB_NONCE_SALT', 'GENERATED6');
    $bb_table_prefix = 'bb_';
    $bb->bb_xmlrpc_allow_user_switching = true;
    ?>

    I have enabled xmlrpc in WP and BB.

    The cookies that are being stored have the following values:

    wordpress_logged_in_SAMEHASHEVERYTIME
    username%7CNUMBER1%7CHASH1
    site.com
    /

    wordpress_SAMEHASHEVERYTIME
    username%7CNUMBER2%7CHASH2
    site.com
    /wp-admin
    /wp-content/plugins
    /foro/my-plugins
    /foro/bb-plugins
    /foro/bb-admin

    As you see the values of the cookies are not the same. Is this Ok?

    So, I get this cookies if I login to WP on site.com, then when I go to BB on site.com/foro, I am not logged in. If I login to BB on site.com/foro, I get logged out of WP on site.com.

    Every time I login, the cookies change, but “SAMEHASHEVERYTIME” is the same every time for WP and BB.

    I don’t know what I’m missing or where is the problem.

    Why aren’t they picking up the cookies?!

    Thank you.


    Coffee4cr
    Member

    @coffee4cr

    I have the same cookie problem as you. same version of WP and BB

    1. Shut off your caching plugin first.

    2. You didn’t follow #8 correctly. “define(‘COOKIEPATH’, ‘/’ );” should be after ?php

    if it doesn’t work email me (on my profile)


    Coffee4cr
    Member

    @coffee4cr

    alright I found my problem.

    i had the blog running on PHP5

    and the bbpress running on PHP4

    gerikg, thanks so much for clearing things.

    there is 1 problem though, when you login/logout with bbpress everything works, you automatically logged in/logged out to wordpress too.

    but when you login or loggout from wordpress it does no effect on bbpress.

    Do you have any idea with this issue?

    OK, I’ve followed the steps quite a bit, and no integration. Oddly enough, when one is signed in, the other is automatically signed out – you can’t be signed into WPMU and bbP at the same time. Step by step, this is what I did:

    1 When installing wordpress/bbpress do NOT use "www." Example: use bbpress.org not http://www.bbpress.org and use the same database. You do not need to change the prefix, I prefer you don't because you'll run into problem later.

    Done.

    2 Make sure bbpress is in a folder in wordpress. example: wordpress/bbpress/ not on the same level.

    Done. WP is in root folder, bbP is in forums

    3 The folder does not have to be named bbpress, most people make it forum or forums.
    *After successfully installing both programs open wp-config.php (in the wordpress folder) file. Around line # 45-# 48 you'll see define('AUTH_KEY'.... go to this URL (https://api.wordpress.org/secret-key/1.1/salt) and get the EIGHT keys and REPLACE the FOUR keys that are there. Save. Keep the file open for now.
    4 Open bb-config.php (in the bbpress folder) do the same thing here. With the SAME keys you put in the wordpress file put in the bb-config file around line # 41-45. You have to add BB_ to the front of the names. Example: BB_AUTH_KEY to all eight. Save. Keep the file open for now.

    Done.

    5 Clear your cache on your browser. Log into your bbpress dashboard and go to Settings->Wordpress Integration-> WordPress Administrator should be keymaster. Every other option should be member for now. WordPress address (URL) should be the URL again NO www. Blog address (URL) the same as before. The last 3 should be LOCKED if not repeat the steps 3&4.

    Done. Address is http://analyticspros.com.s70609.gridserver.com/

    6 Login to your wordpress dashboard. Go to Plugins->Add New-> search for "bbPress Integration" it should be the first one. Install it and activate.
    7 Go to Settings-> bbPress Integration. Enter the bbPress URL without the www. Your plugins URL leave blank. Click on Save Changes. On the bottom box you'll see some text copy it. Most likely it will say "define( 'COOKIEPATH', '/' );"

    Done. This is the code:

    define( ‘COOKIEHASH’, ‘c89fdd6b36f463ff1f02811d64f2f597’ );

    define( ‘COOKIE_DOMAIN’, ‘.analyticspros.com.s70609.gridserver.com’ );

    define( ‘SITECOOKIEPATH’, ‘/’ );

    define( ‘COOKIEPATH’, ‘/’ );

    8 Paste the line in wp-config.php file around line # 16 (MUST be on top. Don't know why) and paste it in bb-config.php in line # 13 (Must be on top). Save. You can delete the plugin, it's no longer needed.
    9 Clear your cache on your browser and you're done.

    Known Problems
    *Two different database, one for WP and one for BBP, does not always work.
    *Changing the database prefix. There are tutorials out there that tell you to do it, just don't.
    *Hosting companies that offer free databases, have buggy databases.
    *BBpress not being in WordPress folder. I don't think the plugin takes that into account.
    *When you upgrade from an older version (wordpress/bbpress) the XX-config.php files are different than what you already have. Check wp-config.php against wp-config-sample.php & bb-config.php against bb-config-sample.php should be fairly simple.

    None of the above problems apply to me. Any ideas?

    I am having the same problem as Brevica with WPMU 2.9.1 and bbPress. Integration just isn’t working properly. The cookies being generated are fine, but nothing in bbPress works as it should. Specifically though anyone on the WPMU site can login, their roles do not map. The result is that no one has “keymaster” access to administer bbPress. All of this is being done with a fresh install of both WPMU and bbPress.


    kingkong954
    Member

    @kingkong954

    Using WP 2.9.1 and bbPress 1.02 and I also cannot get integration.

    Followed the steps in this thread, but I am getting the same symptom as most:

    Login WP -> knocks me out of bbPress

    Login bbPress -> knocks me out of WP

    …user access/roles share across both fine, however.

    WPMU is a little different

    Try these steps.

    https://bbpress.org/forums/topic/login-integration-issues-bbpress-and-wordpress-mu#post-62274

    Someone I was helping said that php5 must be used.

    Works! Had the same problem of WP & bbPress login knocking each other out but followed the steps of gerikg in this post and somehow overlooked (or wasn’t clear enough to me) these:

    1. (re. step 4) make sure you prefix the KEY variables with “BB_” when copying to bb_config.php (AUTH_KEY => BB_AUTH_KEY, SECURE_AUTH_KEY => BB_SECURE_AUTH_KEY, LOGGED_IN_KEY=> BB_LOGGED_IN_KEY …)

    2. in bbPress WordPress Integration (under bbPress Settings) copy in the values into 3 fields of Cookies directly from the keys that were generated for you (WordPress “auth” cookie salt = AUTH_SALT, WordPress “secure auth” cookie salt = SECURE_AUTH_SALT, WordPress “logged in” cookie salt = LOGGED_IN_SALT) (do not get the values from clicking on the link WordPress admin page, where I couldn’t find all the values anyway)


    kingkong954
    Member

    @kingkong954

    Eureka!

    I upgraded my hosting to PHP 5 and everything works, now! For those hold outs who have done everything and still cant get integration.. ensure you’re running php5.


    LizFilardi
    Member

    @lizfilardi

    This all works fine for me. However, I don’t get any emails from bbpress or wordpress, including new user passwords, password resets, comments, etc. I’ve checked out past forum posts about that topic, and the latest I could find was a year ago, including a topic in which Sam Bauer says that the problem has been solved by adding a solution to the core package in the latest version of bbpress. any reason why integration would interfere with emailing? (i didn’t test email anything pre-integration).


    gerikg
    Member

    @gerikg

    LizFilardi, doesn’t sound like it has to do with integration. Reinstall bbpress and test it out first before integrating.


    hydroweb
    Member

    @hydroweb

    External Install…almost there…..

    Login to WP as admin, click on forums (bbpress) tab and see that I am logged in to BBpress as roger|Admin|Log Out. (I am roger)

    But it is only a “partial” login. If I click “roger”, I go to profile page. If I click Admin, nothing happens!

    But, there is a workaround.

    If I logout and login at bbpress, then Admin takes me to dashboard.

    Whoa, there is another problem. If I try to logout from bbpress dashboard, buddypress says page not found.

    Workaround is to “visit site” and then I can logout of bbpress.

    All of this is very weird behavior. Any ideas about what is going wrong?


    boofit
    Member

    @boofit

    Thanks gerikg!

    I’ve been struggling with this aspect since I lost my WordPress virginity 3 weeks ago.

    Wp 2.9.2

    bb 1.0.2

    PHP 5

    all www’s removed

    I had tried everything I could find in the forum and new I was getting close when I could log on to Wp but not BB and vice versa. Then I found this thread followed gerikg’s instructions and could then log on to Wp and go into Dashboard, but when I visited the site, it showed me as logged off Wp and logged on to BB.

    I then moved define( ‘COOKIEPATH’, ‘/blog/’ ); from BELOW define cookies to LINE 16 and still the same. Finally I changed cookie path to define( ‘COOKIEPATH’, ‘/’ ); and now I can log in or out of either Wp or BB and it logs me in/out of the other so I am very happy to have resolved finally but will proceed with caution when the next upgrade comes along.

    It should be noted that bbPress Integration suggested define( ‘COOKIEPATH’, ‘/blog/’ );

    Also note that I couldn’t get the keys to lock as described in gerikg’s notes but all keys definately the same in both xx-config.php’s

    Finally, it was a nightmare and almost gave up but as someone already said I did learn a lot. Thanks


    excalibur_
    Member

    @excalibur_

    gerikg;

    I’ve followed your instructions to the T – I’m getting the issue where logging into one system logs you out of the other.

    I am using WP 2.9.2 (not MU) and bbPress 1.0.2.

    Some noted things:

    – in the wp-admin/options.php page, there is no secret_auth_salt variable

    – the bbPress integration plugin only generated one line of code ( define(‘COOKIEAUTH’, ‘/’); ) rather than Brevica’s 4 statements

    Everything else looks normal as per your instructions.

    Other possibly useful info:

    forum – http://monucs.aicsa.org.au/forums/

    blog – http://monucs.aicsa.org.au/

    running PHP 4.4.8/MySQL 5.0.77 – these can’t be changed


    bradsucks
    Participant

    @bradsucks

    I’m struggling with this as well. The difference is I installed a vanilla WordPress 2.9.2 and bbPress 1.02 as a test and got the integration working easily. However I have a blog I just upgraded from WordPress 2.8 to 2.9.2 and from bbPress 1.0 to 1.02 and nothing I do will make it work. I can’t see any particular difference and I’m just about to die of frustration here.

    hi guys,

    thanks gerikg’s instrucition,very helpful!

    i followed gerikg’s instruction,but meet a problem.

    on task 7 after i clicked on save changes,

    i should get the code below:

    define( ‘COOKIEHASH’, ‘9ff1a614da865684d07223b202d18708’ );

    define( ‘COOKIE_DOMAIN’, ‘.10.10.1.20’ );

    define( ‘SITECOOKIEPATH’, ‘/wordpressmu/’ );

    define( ‘ADMIN_COOKIE_PATH’, ‘/wordpressmu’ );

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

    but actually i lost

    define( ‘ADMIN_COOKIE_PATH’, ‘/wordpressmu’ );

    so when i log into bbpress then

    i can log into wordpressmu automatically

    but i cant log into wordpressmu admin automatically

    does anybody have an idea what i have missed?

    your help will be much appreciated.

    thanks guys

    Buddypress is a little tricky. What do you mean `but actually i lost

    define( ‘ADMIN_COOKIE_PATH’, ‘/wordpressmu’ );`?

    hi gerikg,

    thanks for your reply.

    by saying `but actually i lost

    define( ‘ADMIN_COOKIE_PATH’, ‘/wordpressmu’ );`?

    i mean:

    on task 7 after i clicked on save changes,

    i got four lines (notfive as i wrote above)

    define( ‘COOKIEHASH’, ‘9ff1a614da865684d07223b202d18708’ );

    define( ‘COOKIE_DOMAIN’, ‘.10.10.1.20’ );

    define( ‘SITECOOKIEPATH’, ‘/wordpressmu/’ );

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

    i think this is the resean that

    when i log into bbpress then

    i can log into wordpressmu automatically

    but i cant log into wordpressmu admin automatically

    i think it has nothing to do with buddypress.

    what do you think?

    by the way

    you can check this out ,it seems that some guy have met the same problem:

    https://wordpress.org/support/topic/298537/page/2?replies=47

    scroll down to the middle of the page (mjjinvincible’s post)

    thanks

    Okay what I noticed is the only time you get ADMIN_COOKIE_PATH line is when your WP is in a folder:

    site.com/folder/ wordpress and site.com/folder/forums bbpress.

    then the result will be ADMIN_COOKIE_PATH is /folder as for an answer I still haven’t been able to try it to tell you.

    Thanks Coffee4cr and kingkong954!

    Changing from PHP4 to PHP5 worked for me.

    I then deleted these lines from both wp- and bb-config.php files (earlier “fixes”)

    define( 'COOKIEHASH', 'dsfasdfasdfasdfas' );
    define( 'SITECOOKIEPATH', '/' )

    and it still works.

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