getting problems in phpbb2 integration

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mayanktalwar1988
Forum Contributor
Posts: 133
Joined: Wed Jul 08, 2009 2:44 am

getting problems in phpbb2 integration

Post by mayanktalwar1988 »

i was just trying out the phpbb2 session wioth another page after readind a tutorial.....the page i am testing is this


Code: Select all

<?php
    define('IN_PHPBB', true);
    $phpbb_root_path = './forum/';
    include($phpbb_root_path . 'extension.inc');
    include($phpbb_root_path . 'common.'.$phpEx);
 
    //
    // Start session management
    //
    $userdata = session_pagestart($user_ip, PAGE_INDEX);
    init_userprefs($userdata);
    //
    // End session management
    //
    
 
 
if($userdata['session_logged_in'])
{
echo('Hi ' . $userdata['username'] . '!');
}
else
{
echo('You are a guest');
}
 
?>
 
 
 
 
 
 
 
 
 
 
 
 
<html>
<body>
 
<h1>My First Heading</h1>
 
<p>My first paragraph.</p>
 
<a href="bb">Link text</a> 
</body>
</html>
 

my directory structure ...htdocs/test/forum







1.the above file i named index.php...when it opens it displayed accurately you are a guest..
but when i log in to phpbb.....the problem is that after fillin the log in details when i click
log in button ,it end up in this http://localhost/forum/index.php?sid=e8 ... b4b2a10511


but it should have ended like this http://localhost/test/forum/index.php?s ... b4b2a10511

as the former url dosent exist it displays url dont found...


but when i manually type the later url..it shows me logged in......and log out also face the same problem...........




where is the problem?
mayanktalwar1988
Forum Contributor
Posts: 133
Joined: Wed Jul 08, 2009 2:44 am

Re: getting problems in phpbb2 integration

Post by mayanktalwar1988 »

what to do with above?
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: getting problems in phpbb2 integration

Post by jackpf »

I don't know much about phpbb, but I'd guess you're not setting the right path. Try changing it in the admin panel, or whatever you use to change settings.
mayanktalwar1988
Forum Contributor
Posts: 133
Joined: Wed Jul 08, 2009 2:44 am

Re: getting problems in phpbb2 integration

Post by mayanktalwar1988 »

changed the script path from with in admin panel to test/forum intially it was /forum/ now its working
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: getting problems in phpbb2 integration

Post by jackpf »

Cool.
Post Reply