...

View Full Version : PHPBB Login Integration w/ my dynamic site



macmonkey
09-11-2005, 07:15 PM
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/viewtopic.php?t=4968&sid=08f70a9e348e55a015ecd2382e0331fd

I've included the 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_ip, PAGE_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:


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
init_userprefs($userdata);

Anyone familiar with my problem?

thanks

macmonkey
09-11-2005, 07:17 PM
I've fixed the problem which was a "/" issue in my root path.

thanks anyways

akram
01-18-2009, 09:30 AM
Please specify where to remove the slash.

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

Please help me.

oesxyl
01-18-2009, 11:59 AM
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, :)


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


next time put your code between [ code] and [ /code] tags please, :)

regards

akram
01-19-2009, 08:06 AM
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.

akram
01-20-2009, 08:14 AM
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:




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.:confused:

thanks,
akram.

PappaJohn
01-20-2009, 09:27 AM
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.

akram
01-20-2009, 03:37 PM
Hi,

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




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



thanks,
akram.:confused:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum