Topic: include ('content/punbb/index.php');

Ring the alarm!  Another newbie is trying...
How do I set up a punbb forum inside a php-website?

I've got a php webpage, and somewhere is says:

<td>
   include ('content/punbb/index.php');
</td>

but instead of my forum (which runs fine in a seperate window - thank you!), the table is filled with these nice messages:

Warning: main(./include/common.php): failed to open stream: No such file or directory in c:\...\content\punbb\index.php on line 27

Fatal error: main(): Failed opening required './include/common.php' (include_path='.;c:\php4\pear') in c:\...\content\punbb\index.php on line 27

What do I have to do?

2 (edited by Jansson 2004-05-24 20:32)

Re: include ('content/punbb/index.php');

You should change the $pun_root variable in index.php to "content/punbb/"

But that will only fix index.php. You also have to change on all other pages.

Re: include ('content/punbb/index.php');

I changed the value of  $pun_root in all the files in the main directrory of the forum.  Some progress is made, becaus the opening page of the forum is shown.  However, it doesn't function and is accompanied by messages that all look like this:

Warning: Cannot modify header information - headers already sent by (output started at c:\program files\apache group\apache\htdocs\construction\main.php:19) in c:\program files\apache group\apache\htdocs\construction\content\punbb\include\functions.php on line 82

How do I get main.php (the webpage where punbb/index.php is included in) to include the headers my forum needs?

Re: include ('content/punbb/index.php');

Including the forums from other PHP scripts can be rather difficult. I recommend that you instead include your other PHP scripts in the PunBB templates (include/template/). How to include PHP code from the templates can found in faq.html.

"Programming is like sex: one mistake and you have to support it for the rest of your life."