Skip to:
Content
Pages
Categories
Search
Top
Bottom

Guranteed Fix for WP/bbPress Integration!

  • Make sure you have this at the top of both WP and bbPress .htaccess files

    AddHandler php5-script .php

Viewing 12 replies - 1 through 12 (of 12 total)
  • Please elaborate!

    The integration needs to use php5. Some hosting company needs you to put something in your htaccess file. I have 1and1 and you have to put that line. http://faq.1and1.com/scripting_languages_supported/php/9.html


    kevinjohngallagher
    Member

    @kevinjohngallagher

    I never knew that.

    I suppose it’s another quirk we could add in to be on the safe side.

    Nice one Driz and Gerikg (btw Gerikg, i sent 3 people to your site yesterday to use your walkthrough – well done mate its really good).


    chrishajer
    Participant

    @chrishajer

    Why does the integration need to use PHP5? Is there a function present in PHp5 that is not in PHP4 that makes this work? Or more likely a function that works differently in PHP5 (since a missing function would give an error.)


    zaerl
    Participant

    @zaerl

    The more I read the migration docs from php.net the more I think that none of the changed functions can break the wp/bb integration.


    chrishajer
    Participant

    @chrishajer

    I think it’s probably a little over-reaching to say this is a guaranteed fix. There are so many other things that need to happen before integration works in every case. This may be one part of it, but I’d like to know why.


    kevinjohngallagher
    Member

    @kevinjohngallagher

    I absolutely agree that this is far from a “guarenteed” fix, but I’ve long found that the more things we can rule out when going through a bbPress to WordPress integration the easier life becomes.

    For example, I still define the following in my WordPress config file:

    define(‘AUTH_KEY’, ‘authkey’);

    define(‘SECURE_AUTH_KEY’, ‘secureauthkey’);

    define(‘SECURE_AUTH_SALT’, ‘secureauthsalt’);

    define(‘LOGGED_IN_KEY’, ‘loggedinkey’);

    define(‘LOGGED_IN_SALT’, ‘loggedinsalt’);

    define(‘SECRET_KEY’, ‘secretkey’);

    define(‘SECRET_SALT’, ‘secretsalt’);

    define(‘NONCE_KEY’,’nonce_key’);

    define(‘NONCE_SALT’, ‘nonce_salte’);

    define(‘COOKIE_DOMAIN’, ”);

    define(‘COOKIEPATH’, ‘/’);

    define(‘CUSTOM_USER_TABLE’, ‘wp_users’);

    define(‘CUSTOM_USER_META_TABLE’, ‘wp_usermeta’);

    And the following in my bbPress config file:

    define(‘BB_AUTH_KEY’, ‘authkey’);

    define(‘BB_SECURE_AUTH_KEY’, ‘secureauthkey’);

    define(‘BB_SECURE_AUTH_SALT’, ‘secureauthsalt’);

    define(‘BB_LOGGED_IN_KEY’, ‘loggedinkey’);

    define(‘BB_LOGGED_IN_SALT’, ‘loggedinsalt’);

    define(‘BB_SECRET_KEY’, ‘secretkey’);

    define(‘BB_SECRET_SALT’, ‘secretsalt’);

    define(‘BB_NONCE_KEY’,’nonce_key’);

    define(‘BB_NONCE_SALT’, ‘nonce_salte’);

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

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

    $bb->wp_table_prefix = ‘wp_’;

    $bb->user_bbdb_name = ‘XXXXX’;

    $bb->user_bbdb_user = ‘XXXXX’;

    $bb->user_bbdb_password = ‘XXXXX’;

    $bb->user_bbdb_host = ‘localhost’;

    $bb->custom_user_table = ”;

    $bb->custom_user_meta_table = ”;

    $bb->authcookie = ‘wordpress_’;

    $bb->cookiedomain = ”;

    $bb->cookiepath = ‘/’;

    $bb->sitecookiepath = ”;

    $bb->wp_table_prefix = ‘wp_’;

    Now I know that most of that code is redundant, and left over from older integration methods; but by using this as a base that I know works for bbPress0.9/1.0.2 to WP2.5->2.9 I’ve found that I’ve not hit any real integration issues that weren’t procedural or human error in over a year.

    Adding “AddHandler php5-script .php” to my .htaccess file wont cause any overhead (as i should be using PHP5 anyway), and will also help rule out that 1 out of 100 times that installation/integration hits an issue.

    @Zaerl and Chris

    PHP4 to 5 was a huge change, a leap into correctly written OOP.

    bbPress1.0.2 (for all its faults) and specifically backPress are really brilliantly written OOP code; and while not 100% sure, i’m quietly confident that using backPress/bbPress1.0.2 on PHP4 would throw some inconsistances.

    I doubt this fix is anywhere near “guarenteed” to solve anything, but if it works for 1 out of 100 people, it should go in the “win” column

    @kevin

    Tell me this –

    • login into WordPress
    • It should be reflected on bbPress side. Right?
    • Try to access bbPress dashboard. Are you able to?

    This seems to be a random problem of all integrations I have done so far.


    zaerl
    Participant

    @zaerl

    PHP4 to 5 was a huge change, a leap into correctly written OOP.

    I was speaking about the backward incompatibilities which are just a bunch of functions.


    kevinjohngallagher
    Member

    @kevinjohngallagher

    Yo dudes,

    @Zaerl

    I know matey, wasn’t meant in a bad way at all :)

    In terms of backward compatability, there’s quite a bit of change to how constructs and classes are handled, and depending on when the code was written, could cause some hidden issues.

    bbPress 0.7,0.8 & 0.9 weren’t major rewrites of any of the basic backend code. A huge chunk of them were written by Matt over a weekend some 7 years ago and the move to backPress was a definative leap (fully awesome OOPness – as much as its kinda useless ).

    So what i meant wasn’t just the leap from PHP4final to PHP5; but also things that were not aimed for PHP4 but that PHP4 supported. i.e. The code that was still in bbPress0.9 that was written when PHP3 was still around.

    @Ashfame

    Long time bro.

    I know the problem of which you speak mate, and while not knowing exactly which bit of code makes it go away, I’ve not had it in ages.

    Login in wordpress >>> check that i’m “logged in” on bbPress >>> access admin.

    Yeah it all works. I’ll have to delve into the code when home, but I think the sites I’m testing on are using “super anne” code/plugin. I also doubt these are on the latest versions of bbpress/wordpress. Frankly I’ve accepted that installing bbpress means not upgrading wordpress.

    As i recall from the long long long thread in 2008, the key thing was having:

    in wordpress config:

    define(‘COOKIE_DOMAIN’, ”);

    define(‘COOKIEPATH’, ‘/’);

    in bbPress config:

    $bb->authcookie = ‘wordpress_’;

    $bb->cookiedomain = ”;

    $bb->cookiepath = ‘/’;

    $bb->sitecookiepath = ”;

    The basic theory was that the bbPress admin, wasn’t reading the wordpress cooking properly or at all, something to do with when it was assigning/pulling data from the “$bb” global variable; so it wouldn’t let you access the admin panel of bbPress. But by setting this info in the config (loaded first) it solved it.

    That may be pie in the sky my friend, but thats what my brain is telling me.


    kevinjohngallagher
    Member

    @kevinjohngallagher

    Oh, and on that note (not to steal from the other thread).

    I’ve only ever used 32 length keys, never 64.

    Again, mightprobably will have 0 impact, but right now it works so…

    I’ve also copied the SALTs from the wordpress and bbpress options page onto the config file.

    Again, probably 100% overkill, but right now it works so…

    This may sound daft, but I’ve accepted that integration isn’t going to be the exact science I think it should be, so i just try to cover the bases.

    @kevin

    yeah buddy! was off track now back to the game ;)

    I will investigate by hard-coding cookiepath, cookiedomain and like stuff in bbPress too.

    I understand your point completely, I would have done the same for production sites and kept the testing going on test site.

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