Access and moderator troubles after brute-force 3.0-to-3.2 upgrade

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
Big Mac
Registered User
Posts: 77
Joined: Sun May 27, 2012 11:31 am
Location: London, UK
Name: David Shepheard
Contact:

Access and moderator troubles after brute-force 3.0-to-3.2 upgrade

Post by Big Mac »

I'm posting this on behalf of another administrator on my forum (as he only just signed up and has not been approved yet):
Chimpman wrote:Support Request Template
What version of phpBB are you using? phpBB 3.2.2
What is your board's URL? http://www.thepiazza.org.uk/bb/index.php
Who do you host your board with? Hostpresto
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Please select your answer
Is registration required to reproduce this issue? Yes
Do you have any MODs installed? No
Do you have any extensions installed? No
What styles do you currently have installed? prosilver
What language(s) is your board currently using? British English
Which database type/version are you using? MySQL 4
What is your level of experience? New to PHP and phpBB
What username can be used to view this issue? No answer given
What password can be used to view this issue? No answer given
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? Refer to: viewtopic.php?f=556&t=2464576
We recently moved hosts, and then upgraded from 3.0 to 3.2.2
Please describe your problem. We appear to be having session problems. Originally the cookie domain was set to
thepiazza.org.uk

However our server domain needs to be
www.thepiazza.org.uk

In this configuration whenever someone hits the forum url and tries to log in, they are immediately directed back to the board index and it appears that the login attempt was unsuccessful (the user is not logged in).

If I change the cookie domain to:
www.thepiazza.org.uk
AND users clear their cookie history, the login appears to work correctly. However we have a large user base (several thousand folks) and most of them probably won't understand what they have to do. Is there a way to resolve this so that users don't have to clear their cookie sessions?
Generated by SRT Generator
We did get warned by Lumpy Burgertushie on our last topic (Trying to prep migrated 3.0 forum for 3.2 upgrade, but stuck) that forcing through a 3.0 to 3.2 without being able to do the prep work in the ACP might cause some issues. This seems to be one.

We are getting an "Your phpBB installation has not been correctly updated. More information »" error message in the ACP.

For some reason, the files version went to 3.2.2 and the database version went to 3.2.1 and an attempt to do the "Update database only" thing caused a timeout and stopped the process.

Another issue we had is that our moderators have all vanished from the page for "The team" and most of them were unable to log in at all. I managed to experiment and turn off the moderator rights of an account, and it was able to log in again. Then I added them back and it worked, but the moderators are still missing from the page for The team, so something is not right there. (We have some phpBB error messages for that, if you think it would help.)

This is much better than before, when we had no access, but we would appreciate any help on what we should look for.
David "Big Mac" Shepheard
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52767
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Access and moderator troubles after brute-force 3.0-to-3.2 upgrade

Post by stevemaury »

What is a "brute-force" upgrade?
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52767
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Access and moderator troubles after brute-force 3.0-to-3.2 upgrade

Post by stevemaury »

Big Mac wrote: Wed Mar 21, 2018 11:46 pm I'm posting this on behalf of another administrator on my forum (as he only just signed up and has not been approved yet):
New users do not have to be approved on this Board.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
Chimpman
Registered User
Posts: 9
Joined: Wed Mar 21, 2018 10:59 pm

Re: Access and moderator troubles after brute-force 3.0-to-3.2 upgrade

Post by Chimpman »

Sorry, didn't realize it was an e-mail activation. I'm the other admin working on the phpBB forums that Big Mac mentioned.

These are the steps that we took to upgrade from 3.0 to 3.2.2 (provided by KevC)

viewtopic.php?f=556&t=2464576#p14966511
KevC wrote:Notes:
  • Your server must be running at least PHP 5.4.7 or higher. [COMPLETED - Current PHP version: 5.6.34]
  • phpBB 3.2 is not compatible with 3.0 and most of the previous files will need to be removed prior to upgrading.
  • Styles and MODs from 3.0 cannot be installed on phpBB 3.2. To upgrade, perform the following steps:
  1. Make a back-up of the original files and database [COMPLETED]
  2. Deactivate all styles except for prosilver [COMPLETED]
  3. Remove all MOD-related changes from the database. The Support Toolkit's Database Cleaner can be used for this. [COMPLETED - used STK Database Cleaner]
  4. Ensure that the activated spambot countermeasure is one of the standard phpBB plugins (Simple image, GD image, GD 3D image, Q&A, reCaptacha). [We didn't have and spambot countermeasures listed in the database]
  5. Set British English as the only language pack and delete all other language pack directories from your server [COMPLETED]
  6. Delete all of your phpBB 3.0.x files EXCEPT for the following: [COMPLETED]
    • The config.php file
    • The /images/ directory
    • The /files/ directory
    • The /store/ directory
  7. Upload the contents of the phpBB3 directory from the uncompressed 3.2.x Full Package (EXCEPT for config.php) into your forum's directory (Note: you don't want to overwrite your original config.php file) [COMPLETED]
  8. Browse to www.example.com/install/
  9. Click the Update tab
  10. Click the Update button
  11. Select "Update database only" and click Submit [COMPLETED]
  12. Wait for the progress bar to reach 100% and for a message indicating that the update has completed [COMPLETED - with errors, I had to run this twice. On the second attempt the progress bar got to 98% before throwing up a timeout error]
  13. Delete or rename the /install/ directory
[COMPLETED]
Chimpman
Registered User
Posts: 9
Joined: Wed Mar 21, 2018 10:59 pm

Re: Access and moderator troubles after brute-force 3.0-to-3.2 upgrade

Post by Chimpman »

I'm just trying to gather all of the errors we have been seeing into one place on the off chance that one of these things might help us track the problem. We turned DEBUG on and this is a message that many of us see (at least the first time we log onto the forum):
[phpBB Debug] PHP Notice: in file [ROOT]/phpbb/auth/auth.php on line 868: Undefined offset: 23
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4517: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3268)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4517: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3268)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4517: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3268)
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53379
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Access and moderator troubles after brute-force 3.0-to-3.2 upgrade

Post by Brf »

My guess would be that someone has a forum role assigned that does not exist. There are 22 standard roles, so if you are using the standard role table, rather than your modified one, the 23rd role could cause that error.
Chimpman
Registered User
Posts: 9
Joined: Wed Mar 21, 2018 10:59 pm

Re: Access and moderator troubles after brute-force 3.0-to-3.2 upgrade

Post by Chimpman »

Brf wrote: Thu Mar 22, 2018 8:45 pm My guess would be that someone has a forum role assigned that does not exist. There are 22 standard roles, so if you are using the standard role table, rather than your modified one, the 23rd role could cause that error.
Thanks, I'll check that out tonight.
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3726
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay
Contact:

Re: Access and moderator troubles after brute-force 3.0-to-3.2 upgrade

Post by Kailey »

Chimpman wrote: Thu Mar 22, 2018 8:10 pm
KevC wrote:
  • Wait for the progress bar to reach 100% and for a message indicating that the update has completed [COMPLETED - with errors, I had to run this twice. On the second attempt the progress bar got to 98% before throwing up a timeout error]
That timeout error may be DBMS related. If you open your config.php file, change the $dbms value from mysql to mysqli.
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules

If you have any questions about the rules/customs of this website, feel free to send me a PM.
Chimpman
Registered User
Posts: 9
Joined: Wed Mar 21, 2018 10:59 pm

Re: Access and moderator troubles after brute-force 3.0-to-3.2 upgrade

Post by Chimpman »

kinerity wrote: Fri Mar 23, 2018 12:32 am
Chimpman wrote: Thu Mar 22, 2018 8:10 pm
KevC wrote:
  • Wait for the progress bar to reach 100% and for a message indicating that the update has completed [COMPLETED - with errors, I had to run this twice. On the second attempt the progress bar got to 98% before throwing up a timeout error]
That timeout error may be DBMS related. If you open your config.php file, change the $dbms value from mysql to mysqli.
Thanks! That did the trick with regard to the database update. I did the following:

- changed the $dbms value from mysql to mysqli
- re-ran the database update

The update ran all the way to 100%. When I go back into the ACP, I no longer see the update error. In the system tab everything is listed as "Current version = 3.2.2"

That may help fix some of the other issues that we are seeing, but at this point I haven't gone through everything yet. I'll come back and update this thread once I check everything out. Thank you!
Chimpman
Registered User
Posts: 9
Joined: Wed Mar 21, 2018 10:59 pm

Re: Access and moderator troubles after brute-force 3.0-to-3.2 upgrade

Post by Chimpman »

Brf wrote: Thu Mar 22, 2018 8:45 pm My guess would be that someone has a forum role assigned that does not exist. There are 22 standard roles, so if you are using the standard role table, rather than your modified one, the 23rd role could cause that error.
Ok, after digging in the database, this is what I found:

1) There are 24 unique roles in the phpbb_acl_roles table. Those roles have ids from:
1 - 22, 24, 25

2) There are 8 unique roles being used in the phpbb_acl_users table. Those roles have the following ids:
0, 1, 5, 6, 11, 14, 20, 23

So... there are actually two roles listed in phpbb_acl_users that do not exist in phpbb_acl_roles (roles 0 and 23). Since we are getting an error specifically referencing role id = 23, I assume that is the role causing our problems. I am curious about role id =0 as well. Is this a reserved role, or do you think that role_id 0 could also be another trouble maker?
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Access and moderator troubles after brute-force 3.0-to-3.2 upgrade

Post by david63 »

On a vanilla install of phpBB 3.2.2 you should have roles 1 - 24. phpBB does not normally use an id of 0 so that is certainly an issue.

Can you post a screen shot of your roles table so that we can see what is there.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
Big Mac
Registered User
Posts: 77
Joined: Sun May 27, 2012 11:31 am
Location: London, UK
Name: David Shepheard
Contact:

Re: Access and moderator troubles after brute-force 3.0-to-3.2 upgrade

Post by Big Mac »

stevemaury wrote: Thu Mar 22, 2018 1:29 pm What is a "brute-force" upgrade?
Sorry for the confusion, Steve. That was me trying to summarise our previous issue Trying to prep migrated 3.0 forum for 3.2 upgrade, but stuck in the topic title.

We were locked out of the ACP (after moving our 3.0 install) and even had some problems getting the STK to work. So we were having to work from outside phpBB to change some of the things required to get ready for an upgrade.

If you can think of a better topic name, I'll be happy to go back and edit my original post.
David "Big Mac" Shepheard
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53379
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Access and moderator troubles after brute-force 3.0-to-3.2 upgrade

Post by Brf »

A role id of zero would mean "no role".
Chimpman
Registered User
Posts: 9
Joined: Wed Mar 21, 2018 10:59 pm

Re: Access and moderator troubles after brute-force 3.0-to-3.2 upgrade

Post by Chimpman »

david63 wrote: Fri Mar 23, 2018 6:39 am On a vanilla install of phpBB 3.2.2 you should have roles 1 - 24. phpBB does not normally use an id of 0 so that is certainly an issue.

Can you post a screen shot of your roles table so that we can see what is there.
I can (and will), but it'll have to wait till I get home from work tonight. Thanks for the help! From memory role 23 was missing. When I looked at a backup database that I had on my local machine (backed up before we began the update process), role 23 was assigned to "Moderators" typed just like that. All other role names were "ALL CAPS", so the "Moderators" name did look a little off. I wonder if we had somehow customized role 23 before the move, and then after the move (and upgrade) the default role 23 (whatever that is) got corrupted in some way? Just grasping at straws. I'll post our actual table as soon as I can.
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52767
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Access and moderator troubles after brute-force 3.0-to-3.2 upgrade

Post by stevemaury »

Here is the SQL to create the default roles. Note that #23 is a New Member role. Roles 23 & 24 were added in 3.1.x., so there was no standard role 23 in 3.0.x. So, it was a custom role you created but now its number has been assigned to another (new) role.

Code: Select all

INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_ADMIN_STANDARD', 'ROLE_DESCRIPTION_ADMIN_STANDARD', 'a_', 1);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_ADMIN_FORUM', 'ROLE_DESCRIPTION_ADMIN_FORUM', 'a_', 3);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_ADMIN_USERGROUP', 'ROLE_DESCRIPTION_ADMIN_USERGROUP', 'a_', 4);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_ADMIN_FULL', 'ROLE_DESCRIPTION_ADMIN_FULL', 'a_', 2);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_FULL', 'ROLE_DESCRIPTION_USER_FULL', 'u_', 3);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_STANDARD', 'ROLE_DESCRIPTION_USER_STANDARD', 'u_', 1);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_LIMITED', 'ROLE_DESCRIPTION_USER_LIMITED', 'u_', 2);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_NOPM', 'ROLE_DESCRIPTION_USER_NOPM', 'u_', 4);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_NOAVATAR', 'ROLE_DESCRIPTION_USER_NOAVATAR', 'u_', 5);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_MOD_FULL', 'ROLE_DESCRIPTION_MOD_FULL', 'm_', 3);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_MOD_STANDARD', 'ROLE_DESCRIPTION_MOD_STANDARD', 'm_', 1);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_MOD_SIMPLE', 'ROLE_DESCRIPTION_MOD_SIMPLE', 'm_', 2);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_MOD_QUEUE', 'ROLE_DESCRIPTION_MOD_QUEUE', 'm_', 4);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_FULL', 'ROLE_DESCRIPTION_FORUM_FULL', 'f_', 7);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_STANDARD', 'ROLE_DESCRIPTION_FORUM_STANDARD', 'f_', 5);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_NOACCESS', 'ROLE_DESCRIPTION_FORUM_NOACCESS', 'f_', 1);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_READONLY', 'ROLE_DESCRIPTION_FORUM_READONLY', 'f_', 2);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_LIMITED', 'ROLE_DESCRIPTION_FORUM_LIMITED', 'f_', 3);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_BOT', 'ROLE_DESCRIPTION_FORUM_BOT', 'f_', 9);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_ONQUEUE', 'ROLE_DESCRIPTION_FORUM_ONQUEUE', 'f_', 8);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_POLLS', 'ROLE_DESCRIPTION_FORUM_POLLS', 'f_', 6);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_LIMITED_POLLS', 'ROLE_DESCRIPTION_FORUM_LIMITED_POLLS', 'f_', 4);

# 23
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_NEW_MEMBER', 'ROLE_DESCRIPTION_USER_NEW_MEMBER', 'u_', 6);

# 24
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_NEW_MEMBER', 'ROLE_DESCRIPTION_FORUM_NEW_MEMBER', 'f_', 10);
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
Post Reply

Return to “[3.2.x] Support Forum”