Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Aug 2004
    Location
    Nashville
    Posts
    202
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHPBB Login Integration w/ my dynamic site

    I'm wanting to use the sessions from my PHPBB throughout my site since it will be mainly wrapped around the forum activity and what-not.

    I've followed this tutorial which seems to be very easy and straight-forward:
    http://www.phpbbhacks.com/forums/vie...ecd2382e0331fd

    I've included the code:

    PHP Code:
    <?  define('IN_PHPBB'true);

    $site_root_path 'http://www.mydomain.com'//
    $phpbb_root_path2 '/forum/'//
    $phpbb_root_path $site_root_path $phpbb_root_path2;
    include(
    $phpbb_root_path 'extension.inc');
    include(
    $phpbb_root_path 'common.php');

    $userdata session_pagestart($user_ipPAGE_INDEX);
    init_userprefs($userdata);

    ?>
    of course modifying the site and phpbb roots accordingly into a file named "top.php" and included this at the very top of my site php pages.

    I'm getting this error:

    Code:
    Hacking attempt
    Fatal error: Call to undefined function: session_pagestart() in /home/content/i/n/t/mydomain/html/includes/top.php on line 10
    which is
    PHP Code:
    init_userprefs($userdata); 
    Anyone familiar with my problem?

    thanks

  • #2
    Regular Coder
    Join Date
    Aug 2004
    Location
    Nashville
    Posts
    202
    Thanks
    0
    Thanked 0 Times in 0 Posts

    n/m

    I've fixed the problem which was a "/" issue in my root path.

    thanks anyways

  • #3
    New to the CF scene
    Join Date
    Jan 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help

    Please specify where to remove the slash.

    $site_root_path = 'http://www.elanguides.com';
    $phpbb_root_path2 = '/forum/';

    Please help me.

  • #4
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by akram View Post
    Please specify where to remove the slash.

    $site_root_path = 'http://www.elanguides.com';
    $phpbb_root_path2 = '/forum/';

    Please help me.
    who said remove, is add a slash,
    PHP Code:
    $site_root_path 'http://www.elanguides.com/'
    next time put your code between [ code] and [ /code] tags please,

    regards

  • #5
    New to the CF scene
    Join Date
    Jan 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks for your help!

    Hi,

    I put this code in the header of my website. I specify the line no.

    [Code]

    4 define('IN_PHPBB', true);
    5 $site_root_path = 'http://www.elanguides.com/'; //
    6 $phpbb_root_path2 = '/forum/'; //
    7 $phpbb_root_path = $site_root_path . $phpbb_root_path2;
    8 include($phpbb_root_path . 'extension.inc');
    9 include($phpbb_root_path . 'common.php');
    10 $userdata = session_pagestart($user_ip, PAGE_INDEX);
    11 init_userprefs($userdata);

    [Code]

    It gives the six warnings and one error:


    Warning: main(http://www.elanguides.com//forum/extension.inc) [function.main]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/content/e/l/a/elanftpcenter/html/head.php on line 8

    Warning: main(http://www.elanguides.com//forum/extension.inc) [function.main]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/content/e/l/a/elanftpcenter/html/head.php on line 8

    Warning: main() [function.include]: Failed opening 'http://www.elanguides.com//forum/extension.inc' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/e/l/a/elanftpcenter/html/head.php on line 8

    Warning: main(http://www.elanguides.com//forum/common.php) [function.main]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/content/e/l/a/elanftpcenter/html/head.php on line 9

    Warning: main(http://www.elanguides.com//forum/common.php) [function.main]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/content/e/l/a/elanftpcenter/html/head.php on line 9

    Warning: main() [function.include]: Failed opening 'http://www.elanguides.com//forum/common.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/e/l/a/elanftpcenter/html/head.php on line 9

    Fatal error: Call to undefined function: session_pagestart() in /home/content/e/l/a/elanftpcenter/html/head.php on line 10


    Please Help me out and tell me what is the problem.

    thanks,
    akram.

  • #6
    New to the CF scene
    Join Date
    Jan 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Request for Help!

    Hi,

    I want to integrate the phpbb login system into m website. I try the above code but i did not run it successfully. Code is:

    Code:
    4 define('IN_PHPBB', true);
    5 $site_root_path = 'http://www.elanguides.com/'; //
    6 $phpbb_root_path2 = '/forum/'; //
    7 $phpbb_root_path = $site_root_path . $phpbb_root_path2;
    8 include($phpbb_root_path . 'extension.inc');
    9 include($phpbb_root_path . 'common.php');
    10 $userdata = session_pagestart($user_ip, PAGE_INDEX);
    11 init_userprefs($userdata);
    i got the error:

    Fatal error: Call to undefined function: session_pagestart() in /home/content/e/l/a/elanftpcenter/html/head.php on line 10

    Please Help me out what is the problem.

    thanks,
    akram.

  • #7
    Senior Coder
    Join Date
    Apr 2007
    Location
    Quakertown PA USA
    Posts
    1,028
    Thanks
    1
    Thanked 125 Times in 123 Posts
    Code:
    5 $site_root_path = 'http://www.elanguides.com/'; //
    6 $phpbb_root_path2 = '/forum/'; //
    7 $phpbb_root_path = $site_root_path . $phpbb_root_path2;
    After this code is executed, $phpbb_root_path will be: "http://www.elanguides.com//forum/" which is not a valid url. Remove one of the slashes in red.

  • #8
    New to the CF scene
    Join Date
    Jan 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks for your help!

    Hi,

    I have tried all the possible urls.Please tell me the write url:

    Code:
     $site_root_path = 'http://www.elanguides.com'; //
     $phpbb_root_path2 = '/forum/'; //
    thanks,
    akram.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •