Mam problem, ponieważ do swojego forum w phpbb3.0.9 dołożyłem Zewnętrzne logowanie.
http://www.nazwa_strony.pl/index.php - Zewnętrzne logowanie
http://www.ziip11.up4y.pl/forum/index.php - po porwanym zalogowaniu przenosi na forum
Wszystko ładnie działa tylko wyświetla mi błąd u góry strony:
Kod: Zaznacz cały
[phpBB Debug] PHP Warning: in file /includes/session.php on line 1035: Cannot modify header information - headers already sent by (output started at /home/użytkownik/domains/nazwa_strony.pl/public_html/index.php:3)
[phpBB Debug] PHP Warning: in file /includes/session.php on line 1035: Cannot modify header information - headers already sent by (output started at /home/użytkownik/domains/nazwa_strony.pl/public_html/index.php:3)
[phpBB Debug] PHP Warning: in file /includes/session.php on line 1035: Cannot modify header information - headers already sent by (output started at /home/użytkownik/domains/nazwa_strony.pl/public_html/index.php:3)
Kod: Zaznacz cały
header('Set-Cookie: ' . $name_data . (($cookietime) ? '; expires=' . $expire : '') . '; path=' . $config['cookie_path'] . $domain . ((!$config['cookie_secure']) ? '' : '; secure') . '; HttpOnly', false);
kod mojego zewnętrznego logowania:
Kod: Zaznacz cały
<head>
<title>Nazwa_Strony</title>
<style type="text/css">
<!--
body,td,th {
color: #FFFFFF;
}
body {
background-color: #000000;
}
.styl1 {
color: #FF0000;
font-weight: bold;
}
-->
</style></head>
<body>
<p>
<?php
define('IN_PHPBB', true);
$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();
if($user->data['is_registered'])
{
echo '<br /><br /><br /><br /><br /><table width="200" border="0" align="center">
<tr>
<td><a href="http://www.nazwa_strony.pl/forum/index.php"><img src="przejdz_do_forum.png" width="454" height="71" /></a></td>
<td><img src="logo3.png" width="267" height="425" /></td>
</tr>
</table></a>';
}
else if(isset($_POST['login']))
{
$username = request_var('username', '', true);
$password = request_var('password', '', true);
$autologin = (!empty($_POST['autologin'])) ? true : false;
$result = $auth->login($username, $password, $autologin);
if ($result['status'] == LOGIN_SUCCESS)
{
//User was successfully logged into phpBB
$redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx");
// append/replace SID
$redirect = reapply_sid($redirect);
meta_refresh(0, $redirect);
trigger_error('You have been logged in');
}
else
{
echo '
<p align="center"><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Podałeś/-aś złe dane użytkownika. <br /><br /><br />Spróbuj ponownie --> <a href="http://www.nazwa_strony.pl/index.php" class="styl1">POWRÓT</a> <--'; //User's login failed
}
}
else
{
echo ' <br />
</p>
<p> </p>
<p> </p>
<p> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"><img src="napis.png" width="652" height="227" /></p>
<form method="POST" action="">
<p align="center">Login:
<input type="text" name="username" size="25">
Hasło:
<input type="password" name="password" size="25"></p>
<p align="center">
<input type="submit" value="Zaloguj" name="login" />
<a href="http://www.nazwa_strony.pl/forum/ucp.php?mode=register"><img src="zarejestruj.png" width="85" height="22" align="absmiddle" /></a>
Zapamiętaj mnie:
<input type="checkbox" name="autologin">
</p>
</form>';
}
?>
</body>
</html>
Z tego co wywnioskowałem to gryzą się ciasteczka. Gdy usunę linijkę 1035 z session.php to problem z wywalaniem błędu znika natomiast pojawia się błąd z "autologowaniem" na pierwszej, zewnętrznej stronie.
Mógłby mi ktos doradzić, pomóc jak to rozwiązać??