WordPress.org

Ready to get started?Download WordPress

Forums

Blank Page when calling wp-config.php (11 posts)

  1. cmccarra
    Member
    Posted 3 years ago #

    Hi All,
    I'm trying to do a simple bridge of wordpress and phpbb. In the overall_header.html of phpbb I have this code:

    <!-- PHP --> require( '/home/poultry/public_html/wp-config.php' );
    wp_cache_init();
    <!-- ENDPHP -->

    This way I can use wordpress theme functions in the overall_header.html to intergrate the styles, though when I add this code it returns a blank page. I have searched a right bit to no avail, any ideas?

    Thanks

  2. eugenealegiojo
    Member
    Posted 3 years ago #

    It sounds that you have error when calling wp-config.php file that's why it returns a white screen of death.

    Correct your path that will point to your wp-config.php file.

  3. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    wouldn't you include wp-load.php instead? wp-config doesn't load wordpress, just defines things

    http://www.corvidworks.com/articles/wordpress-content-on-other-pages

  4. cmccarra
    Member
    Posted 3 years ago #

    Thanks for the replies!

    I tried a few path alternatives, but they all threw up this error:

    Fatal error: require() [function.require]: Failed opening required 'http://poultry.ie/wp-config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/poultry/public_html/forum/cache/tpl_prosilver_overall_header.html.php on line 5

    Using wp-load.php didn't make any difference, I got wp-config.php off some other tutorial, but when I get it working i'll look into which is better to use.

  5. cmccarra
    Member
    Posted 3 years ago #

    Just to add that my actual wordpress install is working fine, and I checked the error log, no obvious errors showing up.

  6. eugenealegiojo
    Member
    Posted 3 years ago #

    You can call the wp-config.php or wp-load.php using relative path. For example:
    include ('../../../wp-load.php');

    Let's say you're overall_header.html located in your root within /phpbb directory, then your include looks like this:
    include('../../wp-config.php');

    Hope that helps.

  7. cmccarra
    Member
    Posted 3 years ago #

    Yeh I tried using relative paths but I got the same error as above. Thanks for your reply though.

  8. cmccarra
    Member
    Posted 3 years ago #

    Any other common problems I can rule out? Kinda in desperate need here, will try anything :L

  9. eugenealegiojo
    Member
    Posted 3 years ago #

    What is the full path of your wp-config.php?
    What is the full path of your overall_header.html?

  10. cmccarra
    Member
    Posted 3 years ago #

    Http://poultry.ie/wp-config.php (installed at the root)
    Http://poultry.ie/forum/styles/prosilver/templates/overall_header.html

  11. eugenealegiojo
    Member
    Posted 3 years ago #

    Have you tried to use the relative path below?
    require('../../../../wp-config.php')

Topic Closed

This topic has been closed to new replies.

About this Topic