phpBB encountered an error building the container due to an installed extension

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
kasimi
Former Team Member
Posts: 4900
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by kasimi »

Add an echo 'adm_page_header'; here: https://github.com/phpbb/phpbb/blob/rel ... cp.php#L35
It should be printed on every page in the ACP. Does it show on the page where you see that error message?
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by shortmort37 »

I see this, everywhere except where I see that error message!

adm_page_header[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_acp.php on line 137: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions_acp.php:35)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_acp.php on line 137: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions_acp.php:35)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_acp.php on line 137: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions_acp.php:35)
User avatar
kasimi
Former Team Member
Posts: 4900
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by kasimi »

It looks like it's the same symptom: instead of adm_page_header(), the non-ACP version page_header() is called, even though you're in the ACP.

These conditions determines which of the two is called:

Code: Select all

if (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])
{
	adm_page_header($page_title);
}
else
{
	page_header($page_title);
}
So IN_ADMIN needs to be defined and the user session must have session_admin enabled (that second condition failed in wads24's case).

The only place IN_ADMIN is defined is here: https://github.com/phpbb/phpbb/blob/rel ... ex.php#L49
As far as I can see the only place where session_admin is enabled is here: https://github.com/phpbb/phpbb/blob/rel ... n.php#L754

To find out which out which of the two is misbehaving, you can go here: https://github.com/phpbb/phpbb/blob/rel ... .php#L4161 and add:

Code: Select all

echo implode(',', [
    defined('IN_ADMIN') ? 'IN_ADMIN_DEFINED' : 'IN_ADMIN_NOT_DEFINED',
    defined('IN_ADMIN') && IN_ADMIN ? 'IN_ADMIN_TRUE' : 'IN_ADMIN_FALSE',
    $user->data['session_admin'],
]);
What does it print on container error page?
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by shortmort37 »

The plot thickens...
59test wrote: IN_ADMIN_DEFINED,IN_ADMIN_TRUE,0
Warning: Cannot modify header information - headers already sent by (output started at /home/sportf5/public_html/59test/includes/functions.php:4142) in /home/sportf5/public_html/59test/includes/functions.php on line 4522

Warning: Cannot modify header information - headers already sent by (output started at /home/sportf5/public_html/59test/includes/functions.php:4142) in /home/sportf5/public_html/59test/includes/functions.php on line 4522

Warning: Cannot modify header information - headers already sent by (output started at /home/sportf5/public_html/59test/includes/functions.php:4142) in /home/sportf5/public_html/59test/includes/functions.php on line 4522
User avatar
kasimi
Former Team Member
Posts: 4900
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by kasimi »

So you don't have session_admin enabled, same as wads24. When you log in to the ACP, do you re-authenticate? Is this line executed? https://github.com/phpbb/phpbb/blob/rel ... ex.php#L37 Add an echo there to make sure.
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by shortmort37 »

Hmmm... No, I'm not prompted to reauthenticate. My code is for 3.2.1 (I'm trying to fix this before I upgrade to 3.2.3), so I don't have exactly what you outlined - and, I wasn't sure what to echo. So I took a stab at it, using your previous echo as an example:

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');

echo implode(',', [
defined('LOGIN_ADMIN_CONFIRM') ? 'LOGIN_ADMIN_TRUE' : 'LOGIN_ADMIN_FALSE',
defined('LOGIN_ADMIN_SUCCESS') && LOGIN_ADMIN_CONFIRM ? 'LOGIN_ADMIN_SUCCESSFUL' : 'LOGIN_ADMIN_UNSUCCESSFUL',
$user->data['session_admin'],
]);

// Mark notifications read


Here's what I see at the top of the user page - I don't see this anywhere in the ACP:

LOGIN_ADMIN_FALSE,LOGIN_ADMIN_UNSUCCESSFUL,0IN_ADMIN_NOT_DEFINED,IN_ADMIN_FALSE,0[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4522: Cannot modify header information - headers already sent by (output started at [ROOT]/index.php:35)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4522: Cannot modify header information - headers already sent by (output started at [ROOT]/index.php:35)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4522: Cannot modify header information - headers already sent by (output started at [ROOT]/index.php:35)
User avatar
kasimi
Former Team Member
Posts: 4900
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by kasimi »

You don't see the prompt To administer the board you must re-authenticate yourself. before entering the ACP, even after logging out completely and logging back in?

Did you make any changes to adm/index.php? Upload a fresh copy from the phpBB 3.2.1 package and try again.
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by shortmort37 »

No, I logged out as user, logged back in as user and went to the ACP - I was not prompted to log back in again.

I just downloaded /59test/adm/index.php, and compared it to the canonical source. They are identical. This is not one of the files I had modded originally; and, I have since replaced all the modded code with their canonical counterparts.
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by shortmort37 »

...I should add, I used to see that prompt, but I haven't for a while. I didn't make the connection, that it's related to the complaint I've been seeing.
User avatar
kasimi
Former Team Member
Posts: 4900
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by kasimi »

This is confusing. You don't see the admin re-auth page which means you already have session_admin enabled, yet you don't because page_header() is called instead of adm_page_header(). :?

Please one more time make sure your files in board root/includes and board root/phpbb are not modified in any way.

On to more debugging: on this line, add echo $user->data['session_admin']; and log out and in again, then go to the ACP. Expected output:
  • ACP re-authentication page: 0
  • ACP front page: 1
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by shortmort37 »

I never saw the reauthentication page. Here's what I see at the main page:
acp wrote:0adm_page_header[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_acp.php on line 137: Cannot modify header information - headers already sent by (output started at [ROOT]/adm/index.php:33)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_acp.php on line 137: Cannot modify header information - headers already sent by (output started at [ROOT]/adm/index.php:33)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_acp.php on line 137: Cannot modify header information - headers already sent by (output started at [ROOT]/adm/index.php:33)
Meanwhile, I'm comparing code in root/includes and root/phpbb to the 3.2.1 source, where I see the date in my production board is different than the last upgrade date. (I have the problem in production too - I copied code from there to produce my test environment.) Looking for something that may have changed, other than the modded code (now back to 3.2.1 in test).
User avatar
kasimi
Former Team Member
Posts: 4900
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by kasimi »

Another idea: on this line, add this code:

Code: Select all

if ($user->data['username'] == 'YourUsername')
{
    debug_print_backtrace();
}
Edit your name on the first line so that only you will see debug information. When you trigger the error it will print what functions have been called where. The error can't be far.

Also, on what page exactly do you see the error?
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by shortmort37 »

You are very gracious to help me! I've reviewed code with timestamp changes in /phpbb and /includes, but it's the same as canon.

I see the error just about anywhere there's a submit button in the ACP where I change settings - attachment settings, email settings, server settings, etc.

Wow - the output was prodigious. It never did stop, so I killed it. I'll PM you the location of a file with the output contents.

Dan
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by shortmort37 »

I had emailed kasimi privately with credentials to my site, and he (immediately!) discovered that in this snippet around line 37 of adm/index.php, the check for reauthentication was commented out:

// Have they authenticated (again) as an admin for this session?
if (!isset($user->data['session_admin']) || !$user->data['session_admin'])
{
//login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false);
}


I suspect this was a remnant of a OneAll Social Bridge for Facebook I have abandoned, or a WordPress Bridge - either way, it's now remedied. Many thanks kasimi!

Dan
Post Reply

Return to “[3.2.x] Support Forum”