Problem with custom page phpbb3

death180

Seasoned Veteran
Joined
Jul 3, 2009
Messages
4,338
Reaction score
0
FP$
1,767
I got a problem. I made home.php and home_page.html and put them in the correct spots and the page works but I have errors at the very top of the screen.

The errors are:
Code:
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4505: Cannot modify header information - headers already sent by (output started at /home.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4507: Cannot modify header information - headers already sent by (output started at /home.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4508: Cannot modify header information - headers already sent by (output started at /home.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4509: Cannot modify header information - headers already sent by (output started at /home.php:1)

Here is my home.php code:
Code:
    <?php
    define('IN_PHPBB', true);
    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include($phpbb_root_path . 'common.' . $phpEx);

    // Start session management
    $user->session_begin();
    $auth->acl($user->data);
    $user->setup();

    page_header('Home');

    $template->set_filenames(array(
        'body' => 'home_page.html',
    ));

    make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
    page_footer();
    ?>

Here is lines 4505 through 4509:
Code:
	header('Content-type: text/html; charset=UTF-8');

	header('Cache-Control: private, no-cache="set-cookie"');
	header('Expires: 0');
	header('Pragma: no-cache');

Can anyone tell me what the problem is here? Thanks a bunch!
 
Code:
page_header('HOME');

...Is the issue, replace with the following code and see if it gets rid of the error.

Code:
page_header($user->lang['INDEX']);
 
This usually means there is a space before the first <? in your home.php file. Delete that and your problem should go away.
 
Creaky said:
This usually means there is a space before the first <? in your home.php file. Delete that and your problem should go away.

Yeah he does, remove the spaces from;

Code:
    <?php
 
Back
Top Bottom