Fresh installation issue with login/register

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
glattering
Registered User
Posts: 3
Joined: Thu May 16, 2019 2:01 am

Fresh installation issue with login/register

Post by glattering » Thu May 16, 2019 2:18 am

Hi there,

I have just installed phpbb from the zip from phpbb website. Installation is fine, my admin account is logged on.
But as soon as I log off and try to log in again, there is a strange error occurring:
The submitted form was invalid. Try submitting again.
I tried several things (cookie domaine, flush cookie, etc), following several threads here and there on this forums, but in vain, it still does not work.
But, very strangely, when I try to connect from my smartphone (firefox) it's working ! But not from my laptop (firefox also).

Any idea is welcome. I feel the fact that it works on another device is a very good hint... but my expertise on this is very limited, so I am hoping you could help me on that !

Thanks,
/glattering

Support Request Template
What version of phpBB are you using? phpBB 3.2.7
What is your board's URL? ----------------------
Who do you host your board with? Synoloy on personal server at home
How did you install your board? I unzipped the package from phpbb website
What is the most recent action performed on your board? Fresh Install
Is registration required to reproduce this issue? No
Do you have any MODs installed? No
Do you have any extensions installed? No
What extensions do you have installed? N/A
What styles do you currently have installed? Flat
What language(s) is your board currently using? English
Which database type/version are you using? Maria DB 10
What is your level of experience? New to phpBB, geek with some basics in linux/network but none in php
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? Nothing
Last edited by glattering on Thu May 16, 2019 3:35 pm, edited 1 time in total.

User avatar
david63
Registered User
Posts: 16172
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Fresh installation issue with login/register

Post by david63 » Thu May 16, 2019 8:11 am

glattering wrote:
Thu May 16, 2019 2:18 am
What styles do you currently have installed? Flat
Is that style for version 3.2.7? - styles have to be for the correct version of phpBB, especially with the latest release
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
EA117
Registered User
Posts: 637
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Fresh installation issue with login/register

Post by EA117 » Thu May 16, 2019 10:33 am

A lot of truth in David's point there, as I'm sure you've seen when reviewing the other various "invalid form" reports in the support area.

And technically yes, there is still a way for it to be "the style's fault" when seeing an "invalid form" result during a login attempt. But at least with phpBB 3.2.7 (as opposed to phpBB 3.2.6), it's no longer a case of "failure because the style didn't add {S_FORM_TOKEN_LOGIN} to the login templates." phpBB 3.2.7 will work for login with a phpBB 3.2.5-compatible style, at least if you login from a page that proSilver also offers the ability to login from. (e.g. The quick login at the bottom of index.php itself; the "Login" link to ucp.php?mode=login typically at the top of index.php, etc.)

So long as the second login attempt you made was through exactly the same login form as your original successful login (e.g. both using the ucp.php?mode=login link, or both using the quick login at the bottom of index.php itself), then there is no style-related cause of an "invalid form" that can be expected. Since if it was an issue with the style that still isn't addressed in phpBB 3.2.7, login wouldn't have worked for the first login attempt, either.

You may have already seen it, but your symptoms sound similar to this report, where using a login form that was otherwise correct for phpBB 3.2.7 login was reporting failure until "the second attempt to login." And the debugging performed through a modified /includes/functions.php showed that the session SID was different between the time the login form has been created & the time the login form was then actually submitted as part of an attempt to login.

(And "not the same session" is a scenario that is supposed to return "invalid form", and has nothing to do with how correct the style's login template fields were.)

At the time, I thought the evidence suggested there must be some kind of caching going on (like CloudFlare), such that an "old' page with a previous SID for some other session was being presented to the current user who then attempted to login. But now I think there is something else going on, like some situation in which phpBB is assigning a new session SID even though one had already been established.

I think it might even relate to reasons why "&sid=" gets added to the URL, even though the session SID should have already been available from the cookie. But that's still something we're in the midst of trying to prove and investigate further, and not any kind of definitive root cause yet. But for example, when I hit the ucp.php?mode=login link from index.php on your server, I see two different session IDs, and don't have an explanation of why yet.

But if you actually are having that same issue, then the workaround mentioned in that thread will apply to you as well. Which is to simply "disable the use of the session SID in forms for not-logged-in users", which is a condition that typically always applies to the login form.

Disable the "Tie forms to guest sessions:" setting in the ACP General tab, Server configuration, Security settings, which controls whether or not Guest sessions (not-logged-on sessions) will try to include the session ID in the form data. Turning off "Tie forms to guest sessions:" is not "how it should be", and is just a workaround for the still-unidentified actual root cause.

glattering
Registered User
Posts: 3
Joined: Thu May 16, 2019 2:01 am

Re: Fresh installation issue with login/register

Post by glattering » Thu May 16, 2019 1:42 pm

Hi and thank you for you detailed reply !

Indeed, it doesn't come from the style. I remember now my previous fresh install I didn't install any other styles than prosilver and the behavior was the same.

Also, I think I fall into the exact same case mention, that is to say : any second login is failing. Because I worked from my smartphone... until I tried to log off and o again from the smartphone and it triggered the issue.

Now I need to find a new machine to be able to log in and change those paramters... unless there is a way. I will read carefully the post you put the link to and give my feedback here.

Again, thanks for your help !
/glattering

User avatar
EA117
Registered User
Posts: 637
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Fresh installation issue with login/register

Post by EA117 » Thu May 16, 2019 2:08 pm

glattering wrote:
Thu May 16, 2019 1:42 pm
Now I need to find a new machine to be able to log in and change those paramters... unless there is a way.
I've never done it that way, but someone else made a suggestion earlier that made sense: On your desktop machine, use the "incognito mode" or whatever "temporarily no history and no tracking" mode of your browser. Since that should give you an equivalent of "never visited this site before, no previous cookies for this site, etc." even though in a normal session from that same browser, these things wouldn't have been true.

User avatar
janus_zonstraal
Registered User
Posts: 3262
Joined: Sat Aug 30, 2014 1:30 pm

Re: Fresh installation issue with login/register

Post by janus_zonstraal » Thu May 16, 2019 2:19 pm

Or install a second browser on your machine :D
Sorry! My English is bat ;) !!!

glattering
Registered User
Posts: 3
Joined: Thu May 16, 2019 2:01 am

Re: Fresh installation issue with login/register

Post by glattering » Thu May 16, 2019 3:34 pm

I followed your advice and use the private browsing mode of firefox and it worked ! So I could make the changes in ACP -> General -> Server configuration -> server settings -> Tie forms to guest sessions: No

And it's working now.
Thanks a lot. Not sure why it didn't work before but at least it's functional now (I hope not at a too high cost that I am not aware of in terms of security).

The newbie I am is very grateful for your help !
/glattering

User avatar
P_I
Registered User
Posts: 924
Joined: Tue Mar 01, 2011 8:35 pm
Location: Calgary
Contact:

Re: Fresh installation issue with login/register

Post by P_I » Tue May 21, 2019 9:00 pm

EA117 wrote:
Thu May 16, 2019 10:33 am
Disable the "Tie forms to guest sessions:" setting in the ACP General tab, Server configuration, Security settings, which controls whether or not Guest sessions (not-logged-on sessions) will try to include the session ID in the form data. Turning off "Tie forms to guest sessions:" is not "how it should be", and is just a workaround for the still-unidentified actual root cause.
I believe I've found another case where this setting comes into play, see viewtopic.php?f=556&t=2512406
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams

Post Reply

Return to “[3.2.x] Support Forum”