Update to 3.3.4 has me locked out at the login page

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
jewel123
Registered User
Posts: 45
Joined: Mon Aug 17, 2020 3:21 am

Update to 3.3.4 has me locked out at the login page

Post by jewel123 »

Yesterday I set up xampp on my PC as per the instructions on this board. I then transferred a copy of my board files and database from the live server and all went well. I was using the board last night with no problems. I accessed the board this morning with no problem and saw that an update to 3.3.4 was available so I went ahead with it. I used the Full Package approach and now I'm unable to log in - access to ACP not allowed due to not having administrative permissions.

I noticed that just before I updated the database this morning during the update to 3.3.4, a message appeared saying no valid directory was found. I went ahead and finished the process and the database update was successful.

I have confirmed the correct folders/file were deleted from the package before copying the remainder over to the board itself and that the two folders that required deletion from the board itself were deleted beforehand.

I cleared the cache on Firefox.

I turned off the virtual machine this is happening on and turned it on again to see the message had changed. This time the login page said the board was currently unavailable.

I have performed this Full Package procedure before when my database was on the live server and had no problem with that update.

Would appreciate some ideas on how I might fix this.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Update to 3.3.4 has me locked out at the login page

Post by david63 »

When you copied your live board over to your local PC did you change the domain name and cookie (in both the config.php file and the config table in the database, and purge the cache) to relate to your local machine?
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
jewel123
Registered User
Posts: 45
Joined: Mon Aug 17, 2020 3:21 am

Re: Update to 3.3.4 has me locked out at the login page

Post by jewel123 »

In the config.php file:
a)I changed only the DB name by dropping the name of my hosting account that was attached to the name of my DB and used only the DB name itself.
b)I changed the DB user by doing as above and using just the username itself.
If by domain name you are referring to the entry called $dbhost, on both the live server and my PC this is shown as ‘localhost’ and I did not change that.
c) I don't see a reference in the config.php file about cookies to be able to change anything. I've never been involved with cookies using phpbb on the live server and updating it there so I will try to educate myself about cookies.

The two small changes above had everything running well as per my previous post. I don’t remember the phpbb update instructions including anything about cookies unless I missed it. At any rate, I set up a cookie.php file as per a phpbb suggestion and have fiddled with the settings it showed me, one by one, not really understanding what I was doing and needless to say this didn’t work due to my lack of knowledge.

So, to answer your question, David, (and thanks for responding) I made the changes stated above but did not purge the cache (no access but didn’t know to do this anyway) and did not change any tables in the database. I’ve just had a look at tables through phpMyAdmin and would be totally lost on what to do in that particular scenario.

I need more information about the actions you suggest if you could provide that.
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: Update to 3.3.4 has me locked out at the login page

Post by stevemaury »

OP wrote:
I don’t remember the phpbb update instructions including anything about cookies unless I missed it.
An update does not require any attention to cookies. But what you did was also move to a different server (XAMPP).
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
jewel123
Registered User
Posts: 45
Joined: Mon Aug 17, 2020 3:21 am

Re: Update to 3.3.4 has me locked out at the login page

Post by jewel123 »

Thanks, Steve. The forum was running with no problems on xampp until the update was performed. Seems no one knows why. If xampp was going to be problematic for phpbb forums why would phpbb offer instructions on how to install xampp? On balance it would seem the problem likely lies with the update which it might or might not be possible to find a solution to here which in turn is starting to make updates look risky.

I will redo the update and post the result.
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: Update to 3.3.4 has me locked out at the login page

Post by stevemaury »

XAMPP is not problematic. I updated my XAMPP install to 3.3.4 yesterday. No problem whatsoever.

You said you copied your live installation to XAMPP. In doing so, you copied all the settings for the online installation. XAMMP will be different because the server and the database name, script path, etc., are different.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
jewel123
Registered User
Posts: 45
Joined: Mon Aug 17, 2020 3:21 am

Re: Update to 3.3.4 has me locked out at the login page

Post by jewel123 »

Steve, I changed the config.php file details as outlined above i.e. dbname and dbuser so that my live server account name was dropped from them as in xyz_testingforum to testingforum. This worked initially and I could log in and use the forum so I'm not sure why those changes aren't sufficient. Essentially, I don't know what further changes I should make.

On xampp I deleted the DB and file directory, created a new DB and reinstated the backed up forum files and .sql version previous to the update. Whereas before this allowed access to the forum now it does not. I'm able to bring up the board index, FAQs and travel through the posts otherwise.I feel I'm almost there but do not have an idea of how I can resolve the log in.
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Update to 3.3.4 has me locked out at the login page

Post by EA117 »

You may already be fully aware, but since I didn't see any versions cited, is your XAMPP PHP version less than your production site's PHP version?

Having PHP 7.1 instead of PHP 7.2, or PHP 7.2 instead of PHP 7.3 / PHP 7.4 / PHP 8.x, the inability to login can be because the older PHP version you're running under XAMPP doesn't have the algorithim needed to match the password hashes that are in your production site's database.

So if your XAMPP and production PHP versions are exactly the same, you are fine. And if your XAMPP and production site are both PHP 7.3 or later, you're also fine. But if the difference between your production and XAMPP PHP versions crosses PHP 7.1 or PHP 7.2 boundaries, the XAMPP PHP version might be insufficient to match what your production site is doing when hashing the passwords.

edit: I always forget to mention, if you're using PHP 7.3 or later, it can also be because the "sodium" extension isn't enabled in your XAMPP PHP.INI. This would also prevent access to the algorithims that your production server may have access to, even when running exactly the same PHP version. Maybe put the phpBB /install/ folder back in your XAMPP temporarily, long enough to check opening /install/phpinfo.php and see what the PHP Info output confirms regarding both the overall PHP version and any "sodium" support.
Last edited by EA117 on Tue May 04, 2021 2:15 am, edited 1 time in total.
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: Update to 3.3.4 has me locked out at the login page

Post by stevemaury »

jewel123 wrote: Tue May 04, 2021 1:41 am Essentially, I don't know what further changes I should make.
Is your cookie domain the same in the online install as the XAMPP install? cookie secure?
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
jewel123
Registered User
Posts: 45
Joined: Mon Aug 17, 2020 3:21 am

Re: Update to 3.3.4 has me locked out at the login page

Post by jewel123 »

EA117, thanks for your response. The xampp version of php is 7.4.16 and on the live site I had to add a phphandler to raise the php level higher than the wordpress site I have there thus: AddHandler application/x-httpd-php74 .php .php5

So it appears that is okay from what you've said.

Steve, yesterday I had a play with the settings that cookie.php shows and made changes like unchecking Secure and changing https to http and removing the web host account name that was attached to the database name and user name. None of these changes made any difference to being able to log in.
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Update to 3.3.4 has me locked out at the login page

Post by EA117 »

jewel123 wrote: Tue May 04, 2021 2:32 am So it appears that is okay from what you've said.
Understood, and agree that the broad strokes say it's okay.

Still relevant is the edit I had added to my message, regarding checking whether the sodium module is enabled in your XAMPP install. Because if it's available in your production site, and not available in the XAMPP install, we're still in the same position of "unable to match the hashes that exist in the production database." So you might want to put the install folder back long enough to check the PHP Info display regarding the sodium module. Or simply look in the XAMPP PHP.INI file, since that's where you would have to enable it if its missing, anyway.
jewel123
Registered User
Posts: 45
Joined: Mon Aug 17, 2020 3:21 am

Re: Update to 3.3.4 has me locked out at the login page

Post by jewel123 »

Oh, I completely missed your edit, EH117. I don't have an install folder anymore as I deleted all the files associated with the update and reinstated my previously backed up files from the live site. Because I now am unable to log in even using the backed up files, I haven't reinstalled the update. However, I look at the php.ini-development file in xampp and saw this - ;extension=sodium.

While I have your attention, may I ask you another question you may be able to give me an opinion on? My original plan was to house the live forum in one subdomain of my site (where the testing forum now resides until it is soon replaced by what will be the live forum) and to have a test forum housed in another subdomain of the site for "identical operating environment" reasons. I understand from a previous discussion here that having two identical databases on two separate subdomains is a very bad idea but this was never my plan. The test forum would have a different database name and credentials and basically consist only of a couple of dummy posts but with the same overall settings as the live forum, and be password protected. Its only purpose would be to check whether any updates or upgrades were going to problematic. This approach is my preference over working with a test forum on my PC. My web host thought it might be okay given the databases don't share anything but similar settings but couldn't assure me. Do you have any wisdom to share about this?
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Update to 3.3.4 has me locked out at the login page

Post by EA117 »

If needed, the install folder is always available from the .ZIP download. You can extract just the install folder, without any intention to actually install or use it. You're just trying to get the PHP Info from a place that doesn't require logging into phpBB ACP.

php-development.ini is a copy of what the suggested developer configuration settings are (loud errors, etc.). The file you want to look at is simply php.ini. But yes, the line you saw, ;extension=sodium, represents the sodium module being disabled. So if you look in the php.ini and see that same line, remove the semi-colon from in front of it, so that it's just extension=sodium and save the PHP.INI file.

Even just having a unique phpBB database table prefix name within a single database should be enough to keep your sites separate. Having separate database names is even better, so long as your host says there isn't any database limit this would exceed. With separate database names, you can even keep the default phpbb_ table prefix in both, and they are still completely separate. If you were making a second production site, perhaps you would also need to talk to the host about database connection limits. But for a test site only you're using, I'm not expecting there to be an issue.

The only "obvious" problems to me is when you want to use a backup copy of the production database to restore to the test site. Which is absolutely the way I would use it, because testing with your 400K or however many messages can be a better test than "just a few forums and test posts" when testing updates or trying new extensions, etc. Plus I've used that to trial things like database left-right fix-ups against my message store to make sure I get the correct result, before doing it against the production site. Things that "only an actual copy of the production database" can tell you.

The things to watch for are already called out in in Knowledge Base - Transferring Your Board to a New Host or Domain. Because that's effectively what you're doing when taking the backup of production.domain.com and restoring it over on test.domain.com.

Specifically the steps of making sure "Force server URL settings:" isn't enabled, since otherwise logging in on the test board could send you over to the production site. And adjusting the cookie settings, so that the cookies saved and used when logging into test.domain.com don't stomp on your cookies for the production site. (Which only affects you, since you're the only one logging on to the test site, but still.)

For my own sanity I would probably re-color the site style & even the ACP's admin.css background so that it was very clear when I was on the test site versus the production site. But that happens even with a local XAMPP site or anything that's an actual restored backup of your site.
jewel123
Registered User
Posts: 45
Joined: Mon Aug 17, 2020 3:21 am

Re: Update to 3.3.4 has me locked out at the login page

Post by jewel123 »

Hi EA117. I did not see sodium as an extension in the root php.ini file but did notice that there was a library file called sodium in xampp.

Great idea of yours to change colours in the test forum. Will investigate that for the future.

I've spent a good deal of time and effort in trying to get this update to work on my xampp. I started from scratch again today and when i used the install function in the browser I received a time-out error. Reading up on this I see that this was fixed for some by making sure config.php had a reference to sqli instead of sql, and mine did.

Pretty much had enough of meeting with irritating failures during this exercise and it must have been miraculous to initially have got the board working on xampp before installing the update, even with supposedly wrong cookie settings. I've decided to go ahead with creating another subdomain on the live server with a database of unique name and credentials but still using the phpbb prefix. I'm unsure how I could import a backup of the live forum into my test forum in the future like you mentioned because as far as my limited knowledge goes, I thought a new database had to have the same name, user and password as the database being imported into it as does config.php file.

Thank you for your detailed explanations. They are always welcome when one is in trouble. I just don't have the time to continue to investigate this issue right now. Cheers.
jewel123
Registered User
Posts: 45
Joined: Mon Aug 17, 2020 3:21 am

Re: Update to 3.3.4 has me locked out at the login page

Post by jewel123 »

I was trying to have lunch in peace but the niggle I wasn't able to log in to my board on xampp wouldn't leave. I did some more reading looking for anything that might be worth a try. I took two actions: I removed the production and installer folders from the cache and I used a private browsing window which accepted my log in credentials.

1. I see from google that private browsing prevents cookies from being stored. Looking at my cookie settings I see these:

Domain: testingforum.name of site domain from live server

Cookie Secure is enabled.

Question: Should either of these be altered? If so for the domain, should I use 'localhost'?

2. Having gained access to the board I took the opportunity to purge the cache as suggested earlier.

Is there anything further I can do in order to be able to log in using a non-private browser window?
Post Reply

Return to “[3.3.x] Support Forum”