Inserting a phpbb2 forum in a php page using includes

SpaceshipSpaceship
Watch

r22pl

Established Member
Impact
0
phpbb in a php site using includes

i keep getting errors when i try different ways to do this
hopefully someone can help

i am working on a website in PHP, and i am trying to use an include script to get my phpBB board, located at forums/index.php, inside of the site with an include

i've been trying for a while and i keep getting errors...

the file is forums.php located in the root, and in it, it says:

<?
include("includes/header.php");

include("forums/index.php");

include("includes/footer.php");
?>

but, when i go to forums.php, it gives me a bunch of errors:

Warning: main(./extension.inc): failed to open stream: No such file or directory in /home/r22pl/public_html/r22pl/forums/index.php on line 25

Warning: main(./extension.inc): failed to open stream: No such file or directory in /home/r22pl/public_html/r22pl/forums/index.php on line 25

Warning: main(): Failed opening './extension.inc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/r22pl/public_html/r22pl/forums/index.php on line 25

Warning: main(./common.): failed to open stream: No such file or directory in /home/r22pl/public_html/r22pl/forums/index.php on line 26

Warning: main(./common.): failed to open stream: No such file or directory in /home/r22pl/public_html/r22pl/forums/index.php on line 26

Warning: main(): Failed opening './common.' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/r22pl/public_html/r22pl/forums/index.php on line 26

Fatal error: Call to undefined function: session_pagestart() in /home/r22pl/public_html/r22pl/forums/index.php on line 31

any help?
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
when you use the include the index.php is looking for /extension.inc instead of /forums/extension.inc or summat like that, there should be a variable in the index.php file for the forums, change that I think

Danny
 
0
•••
ok i changed the variable, it was set to ./ and i changed it to forums/

now the forums came up, but above them, i got more errors:

Warning: Cannot modify header information - headers already sent by (output started at /home/r22pl/public_html/r22pl/includes/header.php:4) in /home/r22pl/public_html/r22pl/forums/includes/sessions.php on line 188

Warning: Cannot modify header information - headers already sent by (output started at /home/r22pl/public_html/r22pl/includes/header.php:4) in /home/r22pl/public_html/r22pl/forums/includes/sessions.php on line 189

Warning: Cannot modify header information - headers already sent by (output started at /home/r22pl/public_html/r22pl/includes/header.php:4) in /home/r22pl/public_html/r22pl/forums/includes/page_header.php on line 475

Warning: Cannot modify header information - headers already sent by (output started at /home/r22pl/public_html/r22pl/includes/header.php:4) in /home/r22pl/public_html/r22pl/forums/includes/page_header.php on line 477

Warning: Cannot modify header information - headers already sent by (output started at /home/r22pl/public_html/r22pl/includes/header.php:4) in /home/r22pl/public_html/r22pl/forums/includes/page_header.php on line 478
 
0
•••
0
•••
doesnt really help, maybe i just dont understand it

if someone could explain it easier that would be appreciated
 
0
•••
The bit in the code that creates the session needs to be at the top of the page now (with the includes) You will have to find the create session bit in the forum index.php and put this righ at the very top of the include page above anything else then delete the session bit from inside the forums index.php page (keep a backup just incase though)

Danny
 
0
•••
adam_uk said:
http://www.phpbb.com/kb/article.php?article_id=143

this will let you connect to phpbb and will resolve the extention errors etc etc and should help in some way
i dont think thats what he is looking for, why are you trying to make it appear on forums.php anyway? why not just send your visitors to forum/index.php?
 
0
•••
jroy said:
i dont think thats what he is looking for, why are you trying to make it appear on forums.php anyway? why not just send your visitors to forum/index.php?

no, its an include file. I'm trying to get the forum inside the page with all my headers and stuff
 
Last edited:
0
•••
ok, well you can accomplish that without having to include in in forum.php, just edit the overall_header.tpl and overall_footer.tpl files in the subsilver folder
 
0
•••
doesn't work
 
0
•••
what part of it doesnt work?
 
0
•••
i just want a way to have a file and be able to include the forum inside it, i know something like that is done in php-nuke

if i cant figure it out, its alright ill just make it in like a different window or something
 
0
•••
it wont work unless you use an iframe because when ever you click a link from the included page it will open up forums/viewforum.php
 
0
•••
alright then i wont worry about it

thanks for the help
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy — Live Options
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back