Jump to content

phpbb2 url redirect


karyoker

Recommended Posts

have tried every combination under the sun trying to get a redirect to separate page if the user isnt logged in.

 

Current try..

<?php

define('IN_PHPBB', true);
$phpbb_root_path = './'; //Root to phpBB
$reportproblem_path = '/HD355/'; 
include( $phpbb_root_path . 'extension.inc' );
include( $phpbb_root_path . 'common.' . $phpEx );

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);


if ($userdata['user_id'] == ANONYMOUS)
         {
           redirect(append_sid('reportproblem2.'.$phpEx));
}
?>

And get these errors:

Warning: Cannot modify header information - headers already sent by (output started at /home/cabaretk/public_html/phbb2/test3.php:15) in /home/cabaretk/public_html/phbb2/includes/sessions.php on line 366

Warning: Cannot modify header information - headers already sent by (output started at /home/cabaretk/public_html/phbb2/test3.php:15) in /home/cabaretk/public_html/phbb2/includes/sessions.php on line 367


sessions.php  line 367 	setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);

 

Link to comment
https://forums.phpfreaks.com/topic/43895-phpbb2-url-redirect/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.