Jump to content

Errors with phpbb integration script


Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.