travismoore Posted May 5, 2008 Share Posted May 5, 2008 I'm probably just making some sort of stupid mistake but here it does. Tutorial: http://www.techtuts.com/tutorials/567/phpbb3_usersystem_integration/tutorial/1 Error: Fatal error: Cannot redeclare deregister_globals() (previously declared in /home/.sheryl/travismoore/llamafiend.com/forum/common.php:32) in /home/.sheryl/travismoore/llamafiend.com/forum/common.php on line 29 Index.php: <?php include('config.php'); //Include our config... if($user->data['user_id'] != ANONYMOUS) //If the user isnt a guest { //It seems they are logged in. Put your content in here? } else { header('location:login.php'); //Hmm they ain't logged in. Redirect them! } ?> <?php include('config.php'); echo '<a href="'.append_sid($phpbb_root_path .'ucp.php?mode=logout&sid='.$user->session_id).'">Logout</a>'; Login.php <?php include('config.php'); //Include our config... if($user->data['user_id'] != ANONYMOUS) //If the user isnt a guest { echo 'You are already logged in.'; } else //else they arent logged in ergo we show the login form. Juts basic HTML { ?> <form action="/forums/ucp.php?mode=login" method="post" enctype="multipart/form-data"> Username: <input name="username" id="user" class="username" type="text" /> <br />Password: <input name="password" id="pass" class="password" type="password" /><br /> Remember me? <input type="checkbox" name="autologin" id="autologin" style="width:14px;" /><br /><br /> <input type="hidden" name="redirect" value="/"> <input name="login" id="submit" value="Login" type="submit" /> </form> <br /><br /> <a href="/forums/ucp.php?mode=register">Register?</a> <?php } ?> <?php define('IN_PHPBB', true); //Define IN_PHPBB $phpbb_root_path = 'forum/'; //the path to where your forums are installed $phpEx = substr(strrchr(__FILE__, '.'), 1); //The file extension include($phpbb_root_path . 'common.' . $phpEx); //Include common.php from the forums directory $user->session_begin(); //begin the user's session $auth->acl($user->data); //Authenticate the user ?> any help is appreciated, thanks Link to comment https://forums.phpfreaks.com/topic/104210-errors-with-phpbb-integration-script/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.