Skip to:
Content
Pages
Categories
Search
Top
Bottom

require_once problems

  • @gkp99

    Member

    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,

Viewing 3 replies - 1 through 3 (of 3 total)
  • @gkp99

    Member

    Nevermind – I was using the wrong relative URL it would seem.

    I settled for this:

    require_once($_SERVER."/forums/config.php");>/code>

    and it works now :-)

    Garry,

    @sambauers

    Participant

    This would probably work:

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

    @john-smith

    Member

    Hi, sambauers

    The code work fine for me , thanks.

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