I’m trying to intergrate PHPBB 3.0 in to my website. To make the forums more intergrated, I thought it would be a good idea to have a login system across the website.
I thought I had it working up till this morning when I started receiving:
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1024: Cannot modify header information - headers already sent by (output started at /hermes/bosweb/web176/b1764/ipg.teachingictorg/index.php:7)
/includes/session.php on line 1024 is refering to the PHPBB3 file which uses:
header('Set-Cookie: ' . $name_data . (($cookietime) ? '; expires=' . $expire : '') . '; path=' . $config['cookie_path'] . $domain . ((!$config['cookie_secure']) ? '' : '; secure') . '; HttpOnly', false);
Ok so that sets the header.
(output started at /hermes/bosweb/web176/b1764/ipg.teachingictorg/index.php:7) refers to my code on my webpage outside the forums:
$phpbb_root_path = ‘./Forum/’;
$phpEx = substr(strrchr(FILE, ‘.’), 1);
include($phpbb_root_path . ‘common.’ . $phpEx);
// Start session management
I was planning on using this on each page I want my login information to be called. There is some more PHP, but this is the bit of code giving me the header issue. Like I said said for some reason this was working up until today when it started giving me error.
If anyone can spot where I went wrong, I would be very grateful.