Hi,
I really need help. I'm trying to integrate PHPBB3 login with my site.Now I have taken tutorials and stuff and made my own using them.
upc.phpphp
<?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'])
{
?>
<form method="POST" action="/forum/ucp.php?mode=login" >
<p>Username: <input type="text" name="username" size="20"><br />
Password: <input type="password" name="password" size="20"><br />
Remember Me?: <input type="checkbox" name="autologin"><br />
<input type="submit" value="Submit" name="login"></p>
<input type="hidden" name="redirect" value="/ucploggedin.php">
</form>
<?php
}
else
{
echo 'Hello ', $user->data['username'],' You are logged in!';
}
?>
ucploggedin.phpphp
<?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'])
{
//Already Loged in
echo "<b>Hello, $user->data['username']<b><br><br>"
echo "<li><a href="$phpbb_root_path . 'ucp.php?i=pm&folder=inbox'">Messages</a><br>"
echo "<li><a href="$phpbb_root_path . 'ucp.php'">Profile</a><br>"
echo "<li><a href="/forum/">Forum</a><br><br><br>"
echo "<center><b><a href="$phpbb_root_path . 'ucp.php?mode=logout&sid=' . $user->data['sid']">Logout</a><b>"
}
else
{
header('Location: /ucp.php');
}
?>
Now the error I'm getting is this.
error
Warning: include(/forum/common.php) [function.include]: failed to open stream: No such file or directory in /home/donclurd/public_html/testchamber/ucp.php on line 5
Warning: include() [function.include]: Failed opening '/forums/common.php' for inclusion (include_path='.
**********/php2/pear/PEAR') in /home/donclurd/public_html/testchamber/ucp.php on line 5
Fatal error: Call to a member function session_begin() on a non-object in /home/donclurd/public_html/testchamber/ucp.php on line 8
And I don't know what it is... says it cant be included. And that file is there!
Ändrew