Skip to:
Content
Pages
Categories
Search
Top
Bottom

Problem with wordpress and bbpress not being in same directory

  • @virtualityreiki

    Member

    trying to integrate bbpress to use my wordpress theme… but running into problems. when i put the code into the bb.config file

    require_once(‘../blog/header.php’);

    if (file_exists(‘../blog/header.php’))

    require_once(‘../blog/header.php’);

    else

    if (file_exists(‘../../blog/header.php’))

    require_once(‘../../blog/header.php’);

    it stacks the path on top of the forum path instead of where it belongs… giving me the error:

    Warning: require_once(../blog/header.php) [function.require-once]: failed to open stream: No such file or directory in /home/xxxx/public_html/forum/bb-config.php on line 70

    Fatal error: require_once() [function.require]: Failed opening required ‘../blog/header.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/xxxx/public_html/forum/bb-config.php on line 70

    has anyone else had this problem… and can you share how to fix it?

    I’m using the method of replacing the header.php file content with <?php get_header(); ?> and the footer with <?php get_footer(); ?> if there is a better way of going about this, I’m open so please share :)

    thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • @virtualityreiki

    Member

    tried doing an absolute path and got this error:

    Warning: require_once() [function.require-once]: URL file-access is disabled in the server configuration in /home/xxxx/public_html/forum/bb-config.php on line 70

    Warning: require_once(http://www.xxxx.com/home/xxxx/public_html/blog/header.php) [function.require-once]: failed to open stream: no suitable wrapper could be found in /home/xxxx/public_html/forum/bb-config.php on line 70

    Fatal error: require_once() [function.require]: Failed opening required ‘http://www.xxxx.com/home/xxxx/public_html/blog/header.php&#8217; (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/xxxx/public_html/forum/bb-config.php on line 70

    @chrishajer

    Participant

    When you are doing “require_once” you need to give it a filesystem path, not a URL.

    So what is the full path to the file you want to include? That’s what your should use if you cannot figure out the relative path.

    @virtualityreiki

    Member

    I tried that and it would stack it on the end anyway… so i would get for example

    home/user/directory/forum/home/user/directory/blog/file.php

    out of desperation i tried the absolute path :)

    just tried something else… I took the important parts out of the header and footer files and put them into the bbpress template files. it is loading now… sort of.

    now onto the game of figuring out how to get some wordpress functions to work. I have the sliding door theme in wordpress, so ugghhh……..

    thanks for your help!

    @virtualityreiki

    Member

    it strikes again…

    put require_once(dirname(__FILE__) . ‘/home/xxxx/public_html/blog/wp-load.php’); into bb-config to get my functions to load and it gave me this error:

    Warning: require_once(/home/xxxx/public_html/forum/home/xxxx/public_html/blog/wp-load.php) [function.require-once]: failed to open stream: No such file or directory in /home/xxxx/public_html/forum/bb-config.php on line 70

    Fatal error: require_once() [function.require]: Failed opening required ‘/home/xxxx/public_html/forum/home/xxxx/public_html/blog/wp-load.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/xxxx/public_html/forum/bb-config.php on line 70

    also tried with:

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

    and it did the same thing, just with the dots after forum/

    any ideas?????

    @virtualityreiki

    Member

    For anybody else out there that is having this problem, this worked for me:

    http://www.wpwebhost.com/make-bbpress-theme-match-with-wordpress-by-deep-integration/

    still needs some tweaking, but overall… total match!!!! yay!

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