bbPress

Simple, Fast, Elegant

bbPress support forums » Installation

require_once problems

(4 posts)
  • Started 3 months ago by gkp99
  • Latest reply from John Smith
  • This topic is not resolved
  1. Hello everyone!

    Here is my setup:
    WP blog = http://www.cocoadummy.com
    BB forums = http://www.cocoadummy.com/forums

    I have set the config.php values as required. I have enabled the bbPress-integration plugin in WP and configured it. I have added

    require_once('../wp-blog-header.php');

    to my bbPress config.php file. (This seems to work as I can call the WP bloginfo('name') function in my footer.

    When I try to go to the forums admin I get the following error:

    Warning: require_once(../wp-blog-header.php) [function.require-once]: failed to open stream: No such file or directory in /home/.omaha/gkp99/www.cocoadummy.co/forums/config.php on line 4

    Fatal error: require_once() [function.require]: Failed opening required '../wp-blog-header.php' (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.omaha/gkp99/www.cocoadummy.co/forums/config.php on line 4

    Also, I have added the following line of code to wp-config so that I can import functions from bbPress into WP (I want to add the online list to my WP sidebar):

    // Import bbPress
    require_once('../forums/config.php');

    I have added it beneath this code:

    // Get everything else
    require_once(ABSPATH.'wp-settings.php');

    (although the error is the same wherever I put it).

    When I goto my blog homepage (www.cocoadummy.com) I get this error:

    Warning: require_once(../forums/config.php) [function.require-once]: failed to open stream: No such file or directory in /home/.omaha/gkp99/www.cocoadummy.co/wp-config.php on line 34

    Fatal error: require_once() [function.require]: Failed opening required '../forums/config.php' (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.omaha/gkp99/www.cocoadummy.co/wp-config.php on line 34

    What am I doing wrong?

    Garry,

    Posted 3 months ago #
  2. Nevermind - I was using the wrong relative URL it would seem.

    I settled for this:

    require_once($_SERVER['DOCUMENT_ROOT']."/forums/config.php");>/code>

    and it works now :-)

    Garry,

    Posted 3 months ago #
  3. This would probably work:

    require_once(BBPATH . '../wp-blog-header.php');

    Posted 3 months ago #
  4. Hi, sambauers

    The code work fine for me , thanks.

    Posted 1 month ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.