The problem that I am coming across is I get a PhpBB Warning

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
Oliver439
Registered User
Posts: 1
Joined: Mon Feb 11, 2019 9:43 am

The problem that I am coming across is I get a PhpBB Warning

Post by Oliver439 » Mon Feb 11, 2019 9:48 am

I am trying it use the authentication of PhpBB 3.2.2 to authenticate the websites users. I have added the code below to the top of a test page

Code: Select all

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();
The problem that I am coming across is I get a PhpBB Warning:

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/template/twig/loader.php on line 176: Declaration of phpbb/template/twig/loader::findTemplate($name) should be compatible with Twig_Loader_Filesystem::findTemplate($name, $throw = true)
I am not trying to load a twig template I just want to access the PhpBB session data to check if a user is logged in or not.

When i navigate to the actual forum itself that works fine without any errors or warnings.

Does anyone have a suggestion as to what the issue might be?

User avatar
mrgoldy
Jr. Extension Validator
Posts: 841
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: The problem that I am coming across is I get a PhpBB Warning

Post by mrgoldy » Tue Feb 12, 2019 11:29 am

You're calling several functions which can trigger errors. And error handling will try to call a template file (message_body.html).
Do you have a stack trace of the error message, rather than just the one line?
Formerly known as posey.
''Proud member of the Studio"

Post Reply

Return to “phpBB Custom Coding”

Who is online

Users browsing this forum: thecoalman and 3 guests