Skip to:
Content
Pages
Categories
Search
Top
Bottom

Deep Integration; WordPress; bbPress; bb-config.php; Errors


  • pkr3
    Member

    @pkr3

    Good News: WordPress operating successfully. bbPress forum operating successfully. “Integrated” (NOT “deep” integrated) bbPress and WordPress successfully.

    Bad News: 12 hours effort to “Deep Integrate” so WordPress theme can be used in bbPress, etc.

    The “require_once(dirname(__FILE__) . ‘/../wp-load.php’)” command line, when executed exactly as instructed inside the “bb-config.php” file (as shown by theme company, WordPress codex, bbPress Forum and Docs) brings up errors when the forum page tries to opens. Removed the Deep Integration code and the bbPress forum page pops back up.

    Facts:

    1. Databases are separate; but regular integration works fine.

    2. All kinds of advice to no avail (i.e. putting code at top of .php file, removing forward slash before root, etc. etc.

    3. Company programmers where I host did test on different server using basic WordPress and bbPress and attained exact same results. Not a directory issue, not a database issue, not a server issue. They also tried other methods/versions of the “require_once” code but kept getting same errors.

    4. WordPress and bbPress are latest versions. WordPress is the brand new 3.0.1…requires different/new “deep integration” coding?

    5. Basic integration works so the database/directory addresses are correct.

    I have searched the forum and internet for solutions, prior to adding this post/topic, to no avail. Blindness and insanity creeping in…probably not due to this issue.

    Thank you. Thank you. Thank you!

    __________

    The errors below are what we ALL are getting on our forum page(s) when attempting to Deep Integrate. (In the errors below “DBnumber” = “undisclosed database number” – AND – “websitename” = “undisclosed website name.”)

    ___________

    Warning: Division by zero in /home/content/08/DBnumber/html/websitename/forum/bb-config.php on line 65

    Warning: Division by zero in /home/content/08/DBnumber/html/websitename/forum/bb-config.php on line 65

    Warning: require_once(0php’) [function.require-once]: failed to open stream: No such file or directory in /home/content/08/DBnumber/html/websitename/forum/bb-config.php on line 65

    Fatal error: require_once() [function.require]: Failed opening required ’0php’’ (include_path=’.:/usr/local/php5/lib/php’) in /home/content/08/DBnumber/html/websitename/forum/bb-config.php on line 65

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

  • Ashfame
    Participant

    @ashfame


    chrishajer
    Participant

    @chrishajer

    Is this really the actual file name you are trying to include:

    0php’

    That should say “wp-load.php” – why the strange characters there?

    Warning: require_once(0php’) [function.require-once]: failed to open stream: No such file or directory in /home/content/08/DBnumber/html/websitename/forum/bb-config.php on line 65

    ^^ This is the source of the problems, right here. bbPress cannot find whatever file you are trying to include, in whatever location you said it was in.

    Can you post line 65 of bb-config.php? Is that where you include wp-load.php?


    chrishajer
    Participant

    @chrishajer

    php’

    That looks like php and then the characters after the “PHP” look like what happens when you paste fancy quotes from a copy of a website. Maybe the opening quotes are similar and causing similar trouble.

    Your include statement should be something like:

    require_once('../wp-load.php');

    If your bbPress installation is in a directory one level below WordPress (i.e. the ../ goes UP one level to find wp-load.php). You can also use a full path there instead of the relative path. In that case, it would look more like:

    require_once('/home/content/08/DBnumber/html/websitename/wp-load.php');


    pkr3
    Member

    @pkr3

    Ashfame,

    Thank you for the link. I/We followed it twice, and several other links/instructions prior to posting the issue. Also, the web hosting provider (a programmer) followed the instructions. The instructions seem to be accurate; we’re just trying to figure out the “hidden” issue. What is strange, is that integration IS working; i.e. “bbPress integration” plugin is installed and active in WordPress. And “WordPress Integration” plugin is installed and active in bbPress. No issues.

    It’s only when we attempt DEEP integration the problem arrises. And that the web hosting provider (programmer) is getting exact same errors, on different environment, servers, etc. is not encouraging. More details in my response to Chris (following this one). I REALLY appreciate your help.


    pkr3
    Member

    @pkr3

    Chris (and Ashfame),

    Thanks for your thorough and prompt attempt to assist me/us.

    Just so you know, there is no “0php’” line of code I entered.

    Here is line 65 code EXACTLY as entered in bb-config.php, on different attempts. Only difference between the two is “/..” Nothing has been altered…I copied these lines directly from the bb-config.php file adding/changing/hiding nothing. As-In, they are direct cut and pastes.

    # 1. This line (when entered) reveals BLANK forum page: require_once(dirname(__FILE__) . ‘/../wp-load.php’);

    # 2. This line (when entered) reveals ERROR forum page: require_once(dirname(__FILE__) . ‘/wp-load.php’);

    # 3. Here are the errors from attempt # 2 above:

    Warning: require_once(/home/content/08/123456/html/website/forum/wp-load.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/08/123456/html/website/forum/bb-config.php on line 65

    Fatal error: require_once() [function.require]: Failed opening required ‘/home/content/123456/html/website/forum/wp-load.php’ (include_path=’.:/usr/local/php5/lib/php’) in /home/content/08/123456/html/website/forum/bb-config.php on line 65

    # 4. This is how the command line(s) appears exactly as entered inside the bb-config.php file. I copied it from the bb-config.php file without changing anything:

    */

    define( ‘BB_LANG’, ” );

    require_once(dirname(__FILE__) . ‘/../wp-load.php’);

    ?>

    # 5. Random Thoughts:

    a. Important: I don’t/didn’t want to combine bbPress and WordPress locations/databases so I have bbPress and WordPress on separate databases (same server). That said, I notice in the WordPress Integration “settings” (within bbPress) The “User Database table prefix” is set to “wp_”. The bbPress Help line/instructions below the field entry reads, “If your bbPress and WordPress sites share the same database, then this is the same value as $table_prefix in your WordPress wp-config.php file. It is usually wp_.”

    I was instructed to enter “wp_” but am beginning to wonder if that is incorrect since the bbPress and WordPress are on separate databases. If incorrect, there are no suggestions of what line/text to enter in that field (“bb_”?). Just sharing.

    b. Silly thought?: WordPress 3.0.1 came out 24 hours before my attempt to Deep Integrate, and was installed, wondering if something has changed in the WordPress 3.0.1 .php files that makes this a “new” issue; therefore requiring an updated deep integration code line. Not blaming WordPress…just sharing the experience.

    Thanks a ton!


    chrishajer
    Participant

    @chrishajer

    Regarding this error:

    # 3. Here are the errors from attempt # 2 above:

    Warning: require_once(/home/content/08/123456/html/website/forum/wp-load.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/08/123456/html/website/forum/bb-config.php on line 65

    That is because the file is not located where you are saying it is located. What is the full filesystem path to the wp-load.php file?

    That’s the first thing you need to resolve – how to include the file, based on where it’s located.


    chrishajer
    Participant

    @chrishajer

    It’s really a simple error of trying to include a file that is not located where you are telling bbPress it is located. Have you tried including it as explained here?

    You can just hard code the full path to the file there and not worry about it unless you change hosts or directories. To prove that it works, just include it like that and I think you will find that it works once you know and use the actual path to the file.

    If you’re worried about changing directories or hosts at some point, you can always use a relative path (with the ../ in front) so long as you use the right path. So far, you have not.

    Do you have shell access on the host with something like SSH? If so, finding the path to the file will be easy. If not, you can still find it based on the error messages you’re getting and the structure of your site.


    pkr3
    Member

    @pkr3

    Chris,

    OK. I will ask the host provider to look into the SSH and confirm, again, the home path.

    Here are the latest attempts in bb-config.php. See anything unusual?

    # 1. No errors, but forum page is blank (after removing the code, bbPress forum becomes visible again, of course).

    define( ‘BB_LANG’, ” );

    require_once(‘/home/content/08/123456/html/website/wp-load.php’);

    ?>

    # 2. Here’s entered code with removed quotes. Causes error on forum page (see below).

    define( ‘BB_LANG’, ” );

    require_once(/home/content/08/123456/html/website/wp-load.php);

    ?>

    Parse error: syntax error, unexpected ‘/’ in /home/content/08/123456/html/website/bb-config.php on line 66

    Thank you. Hopefully we’re narrowing it down.


    chrishajer
    Participant

    @chrishajer

    Is this the first time the page has come up blank rather than showing an error? If so, I think you’re getting closer.

    Method # 2 above is not correct: you need the filename to be quoted. That’s why you’re getting a parse error.

    In method # 1, I think the file is actually there and including it is causing some other problem (a conflict between function names or re-declaring some function.)

    If you log in with FTP and look at the directory listing, can you see the relationship between where wp-load.php is and where your forum is? Can you post a screenshot of that file listing showing the location of wp-load.php and the bbpress folder?

    Also, do you have access to any error logs? The blank screen is a 500 Internal Server error, which should be logged somewhere. It would be interesting to see what the error is. It might actually show that wp-load.php is being included properly (I think it is) and then there is a conflict between functions.

    Chris,

    Thanks for staying on top of this.

    The answer is “No” to your first question. I can get a BLANK forum page at http://website.com/forum/ using 2 codes…

    The first way you already know:

    require_once(‘/home/content/08/123456/html/website/wp-load.php’);

    The second way was mentioned in my 3rd post (Item #1) above:

    require_once(dirname(__FILE__) . ‘/../wp-load.php’);

    # 1. The interesting thing is, from what I can tell, the second way looks EXACTLY like the way the code is “supposed” to look as suggested by most deep integration instructions.

    # 2. I will look into possible 500 Internal Server error log and I’ll gather the info (screen shots) you requested and post.

    # 3. In the meantime,

    “wp-config.php” location (“html” = server directory): html/website/

    “bb-config.php” location (“html” = server directory): html/website/forum/

    And “website forum” URL address location: http://website.com/forum/

    ____________

    Again, appreciate your assistance whether we get this thing going, or not. We will!

    ps – No, the website is not confidential, just not ready for viewing and don’t want to broadcast it; has a lot of “placeholder” stuff that I haven’t read.

    Chris,

    To view, go here: http://www.straightphotography.com/

    Image # 1: bb-config.php location

    Image # 2: wp-config.php location

    Thanks.


    chrishajer
    Participant

    @chrishajer

    This:

    require_once('/home/content/08/123456/html/website/wp-load.php');

    and this:

    require_once(dirname(__FILE__) . '/../wp-load.php');

    Are ultimately doing the same thing. Method 2 here is going “up” one directory. Method one here just spells out the whole path. Both are including the same file and both are giving the white screen, which means there is a 500 Internal Server Error being logged somewhere. We need to see what the error is.

    The first problem was the path to the file was incorrect (with some methods.) The problem is now that you are actually including the file, it’s erroring out. We need to see that error.


    chrishajer
    Participant

    @chrishajer

    Looking at the two images, you now have the correct location of wp-load.php. It’s up one level from the forum directory. But we’ve already established that. Now to see what the error actually is when you include that file.

    Chris,

    PERFECT! Thank you.

    That said, I’m rounding up error log(s) now.

    To think the code WAS right, but the BLANK page was sending me down a rabbit hole even after mentioning it to web host company several times. Arrrrgh!

    Chris,

    This just in…

    Wasn’t able to get error log because page “wasn’t loading.” Apparently, the BLANK page in this scenario is an indication that no errors are occurring because nothing is attempting to load.

    So, I forced the page (bbPress index.php) to load by entering “website/forum/index.php in the browser. Bingo, that forced a visible error. Here it is:

    Fatal error: Cannot redeclare pagelines_localize() (previously declared in /home/content/08/123456/html/website/wp-content/themes/iblogpro4_dev/core/globals.php:53) in /home/content/08/123456/html/website/wp-content/themes/iblogpro4_dev/core/globals.php on line 61

    Thoughts?

    Thanks.

    Latest Test:

    For all examples below, “require_once” represents the command line: “require_once(dirname(__FILE__) . ‘/../wp-load.php’);”

    At no time are errors displaying, nor are the error logs showing “internal 500 error.”

    Test 1: Embedding “require_once” command line into “bb-config.php” causes blank page at forum (http://website.com/forum/) and no themes will load; including bbPress themes.

    Test 2: With “require_once” command line still in “bb-config.php,” entering http://website.com/forum/index.php/ in browser FORCES any bbPress theme (no 3rd party themes) to load, BUT clicking on bbPress “admin” from within the bbPress forum (http://website.com/forum/index.php/) displays another blank page at (http://website.com/forum/bb-admin/).

    Test 3: Removing “require_once” command line from “bb-config.php” file allows bbPress forum homepage to load (http://website.com/forum/) AND allows the bbPress admin page to load (http://website.com/forum/bb-admin/).


    chrishajer
    Participant

    @chrishajer

    pagelines_localize()

    That’s coming from your theme. Try switching to the default WordPress theme and see if the error is still present.

    I can’t download a copy of the Pagelines theme, so can you post the lines from about 50 to 65 in this file:

    /wp-content/themes/iblogpro4_dev/core/globals.php

    At least from line 53 to line 61, but I suspect there may be some conditional around it and need to see the whole context. If you want, you can email me that file at chrishajer [at] gmail [dot] com as well. Looks like you will need to try and declare that function only if it isn’t already declared. This would be a modification to the WordPress theme file.

    But, try the default WordPress theme and see if integration works, or gives another type of error.

    Will do, sir! From the WP globals.php file:

    // LOCALIZE

    function pagelines_localize(){

    // LOCALIZATION – Needs to come after config_theme and before localized config files

    define(‘TDOMAIN’, THEMENAME);

    define(‘LANGUAGE_FOLDER’, TEMPLATEPATH.’/language’);

    load_theme_textdomain(TDOMAIN, LANGUAGE_FOLDER );

    $locale = get_locale();

    $locale_file = TEMPLATEPATH . “/language/$locale.php”;

    if ( is_readable( $locale_file ) )

    require_once( $locale_file );

    }

    ?>


    chrishajer
    Participant

    @chrishajer

    The problem here is that the WordPress theme is from Pagelines and the bbPress theme is too. It looks like both themes have a function called pagelines_localize() and when deep integrating, you get an error since the function name is already in use. The function name should be changed in bbPress probably, or removed (since you probably don’t need it in both places, when you are integrated.) Also, since these are paid themes from the same company, it seems like they should have already heard about this problem, but if not, should be willing to help resolve it.

    Didn’t pagelines used to come around here? I remember their avatar I think.

    http://bbpress.org/forums/profile/arpowers

    haha:

    http://www.pagelines.com/forum/topic.php?id=2243

    Without being logged in, all you can see is the first post. But a search for pagelines_localize brings up that topic, with 4 voices and 11 posts. I think the support should be carried on there since it does not appear to be a problem with bbPress but with the Pagelines themes.

    You got it Chris!

    HUGE help and about what I feared. Not slamming Pagelines, but you can see the issues on the forum you linked to above. They suggested deep integration issues, etc. only to realize they hadn’t given me the proper files to begin with. A lot of my time…poof!

    Alright. I’m off. You have done more than enough and I will post such at the Pagelines forum.

    The problem isn’t solved but you single-handedly zeroed in on it.

    Cheers!

    Everyone,

    For bbPress integrity and stellar bbPress forum support reasons, I’m going to mark this as “resolved,” then post again when the exact problem is truly resolved by the “paid theme” company.

    Thank you.


    chrishajer
    Participant

    @chrishajer

    Looking at the theme files, the function pagelines_localize is only declared once, but with deep integration, it’s trying to be redeclared. So, wrapping the function in a conditional should work to prevent it from being declared again.

    // LOCALIZE
    if(!function_exists('pagelines_localize')) {
    function pagelines_localize(){
    // LOCALIZATION stuff
    }
    }
    ?>

    Having similar issues…

    Symptoms:

    1) Blank forum page if i navigate to http://www.drunkencoders.com/forums/

    2) Forum loads if i http://www.drunkencoders.com/forums/index.php

    3) Blank page if i follow any of the forum title links

    I did however have a wordpress page called “forums” at one point (since deleted) which would have also resolved to this location…possible issue?

    I am using bb-config to load wp-load.php on startup per the suggestions (seems to work as indicated by direct navigation to index.php).

    I am using the wp functions to load header and footer info (this also works as i get my wp site blog wrapped properly around my otherwise plain bbpress install if i navigate directly to index.php)

    Any suggestions or thoughts?

    Moved the bbpress directory to verify it wasn’t a possible collision between the old “forums” page and the “forums” sub directory. Does not appear to be the issue (in other words same symptoms).

    Also verified no errors in my server error log (get undefined get_header() errors if i remove the require(blah/wp-load.php))


    anthonyluth
    Member

    @anthonyluth

    Ok so I’ve got my instance running on Deep Integration but I’ve got a few errors. For one, the headers call but no title displays. Also, I am unable to set how the sidebar is registered. Any thoughts or any help?

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

You must be logged in to reply to this topic.