Грешка при интегриране на сайта - phpbb3

dunix

Registered
Код:
 [phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at /home/gamerbg2/public_html/index.php:9)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at /home/gamerbg2/public_html/index.php:9)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at /home/gamerbg2/public_html/index.php:9)

Как да избегна показването на тази грешка.
Пробвах със слагане на ( session_start(); ) най-отгоре, но не помогна.
Някакви предложения как да го премахна ?
 
Вече дава друга грешка :
Код:
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at /home/gamerbg2/public_html/index.php:1)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at /home/gamerbg2/public_html/index.php:1)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at /home/gamerbg2/public_html/index.php:1)

На ред 1 от index.php ми седи кода за интеграцията - инклуднат
<?php include('top.php'); ?>

А във файла top.php има следното :
Код:
<?php
define('IN_PHPBB', true);
//$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpbb_root_path = './forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
?>
 
Код:
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

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


Пробвай с това
 
Пак същата грешка :
Код:
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at /home/gamerbg2/public_html/index.php:1)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at /home/gamerbg2/public_html/index.php:1)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at /home/gamerbg2/public_html/index.php:1)
 
Извинявам се за второто мнение.


Искам да кажа: като вляза във линка (форум) и после като се върна в началната страница не ми дава тази грешка.
 
защо пишеш на болд? :shock:
сложи ob_start(); най-отгоре в индекс, който ако е с енкодинг утф-8 трябва да е UTF-8 Without BOM ;)
 
alex95_bg_2 каза:
защо пишеш на болд? :shock:

Попринцип с него си пиша. Нещо като запазена марка :).

Това са ми първите редове :


Код:
<?php ob_start(); session_start();
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

$user->session_begin();
$auth->acl($user->data);
$user->setup();
?>
 
т.е. имаш два пъти кода за интеграцията?
Ако е така - махни го единия път. :wink:
 

Back
Горе