Fully site integration with phpBB

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
User avatar
Torreto1337
Registered User
Posts: 6
Joined: Fri Mar 13, 2020 3:43 am
Location: London
Name: Enriko Todorov

Fully site integration with phpBB

Post by Torreto1337 »

Hi, I started to write a system for my site and I want to integrate it with the forum I integrated it, but the problem is that when someone logs in to the site he gets it from his account and he has to log in again and when he clicks again to go to the site he gets it from account.

Here is the code I use for integration:

Code: Select all

	define('IN_PHPBB', true);
	$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : "../community";
	$phpEx = substr(strrchr(__FILE__, '.'), 1);
	include($phpbb_root_path . 'common.' . $phpEx);
	include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
	include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
	$user->session_begin();
	$auth->acl($user->data);
	$user->setup(); 
	$request->enable_super_globals();
I have reviewed error log and I have this error:

Code: Select all

PHP Fatal error:  Uncaught Error: Call to a member function session_begin() on null in 
User avatar
tbackoff
Former Team Member
Posts: 7064
Joined: Thu Jun 04, 2009 1:41 am
Location: cheerleading practice
Name: Tabitha Backoff

Re: Fully site integration with phpBB

Post by tbackoff »

Are you sure your path is right? What does your directory structure look like? Where is this file in relation to your phpBB install?
Flying is the second best thrill to cheerleaders; being caught is the first.
User avatar
Torreto1337
Registered User
Posts: 6
Joined: Fri Mar 13, 2020 3:43 am
Location: London
Name: Enriko Todorov

Re: Fully site integration with phpBB

Post by Torreto1337 »

The path is correct though, if it was not correct in the error logs it would indicate that the path to the forum would be wrong.
User avatar
tbackoff
Former Team Member
Posts: 7064
Joined: Thu Jun 04, 2009 1:41 am
Location: cheerleading practice
Name: Tabitha Backoff

Re: Fully site integration with phpBB

Post by tbackoff »

I assure you it's not. ;) Change ../community to ../community/
Flying is the second best thrill to cheerleaders; being caught is the first.
User avatar
3Di
Former Team Member
Posts: 16052
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milano 🇮🇹 - Frankfurt 🇩🇪
Name: Marco
Contact:

Re: Fully site integration with phpBB

Post by 3Di »

Assuming this is your website ROOT's structure https://www.website.ltd/community
website
-community/config.php
Then to specify the path to your phpBB3 installation directory use:

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './community/';

Just one prepending dot and the appended slash.
To request support for our extensions you can also contact me here: phpBB Studio

Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
🚀 Looking for a specific feature or alternative option? We will rock you! 🚀
User avatar
Torreto1337
Registered User
Posts: 6
Joined: Fri Mar 13, 2020 3:43 am
Location: London
Name: Enriko Todorov

Re: Fully site integration with phpBB

Post by Torreto1337 »

Hello,
A while ago I tried to do it the way you gave me, but the problem is still the same. In my opinion, this problem comes from the automatic installer where web hosting offers it. Any other ideas?
User avatar
3Di
Former Team Member
Posts: 16052
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milano 🇮🇹 - Frankfurt 🇩🇪
Name: Marco
Contact:

Re: Fully site integration with phpBB

Post by 3Di »

Yes, do not use auto-installers for phpBB but do it manually.
To request support for our extensions you can also contact me here: phpBB Studio

Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
🚀 Looking for a specific feature or alternative option? We will rock you! 🚀
User avatar
Torreto1337
Registered User
Posts: 6
Joined: Fri Mar 13, 2020 3:43 am
Location: London
Name: Enriko Todorov

Re: Fully site integration with phpBB

Post by Torreto1337 »

A little while ago I installed the forum manually and installed the system I wrote and had no problems! So the whole problem comes from the automatic installer. Thanks for the quick answers! You can lock the theme.
Post Reply

Return to “phpBB Custom Coding”