Connor McCarra
Member
Posted 1 year 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
eugenealegiojo
Member
Posted 1 year 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.
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
Connor McCarra
Member
Posted 1 year 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.
Connor McCarra
Member
Posted 1 year ago #
Just to add that my actual wordpress install is working fine, and I checked the error log, no obvious errors showing up.
eugenealegiojo
Member
Posted 1 year 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.
Connor McCarra
Member
Posted 1 year ago #
Yeh I tried using relative paths but I got the same error as above. Thanks for your reply though.
Connor McCarra
Member
Posted 1 year ago #
Any other common problems I can rule out? Kinda in desperate need here, will try anything :L
eugenealegiojo
Member
Posted 1 year ago #
What is the full path of your wp-config.php?
What is the full path of your overall_header.html?
Connor McCarra
Member
Posted 1 year ago #
Http://poultry.ie/wp-config.php (installed at the root)
Http://poultry.ie/forum/styles/prosilver/templates/overall_header.html
eugenealegiojo
Member
Posted 1 year ago #
Have you tried to use the relative path below?
require('../../../../wp-config.php')