No Login possible on fresh installation

Started by Dave J, March 11, 2021, 05:13:30 AM

Previous topic - Next topic

shawnb61

I don't think the Imagick issue is related.  I use HostGator & had the Imagick compilation error myself.  I opened a ticket, & they responded not to worry, it was just a red herring, & that the new version was backwards compatible.  I asked them to suppress the messages, which they did.

The first 3 things I would look at:
  1. What is the length of the password_salt field on your members record?  Some forums that were originally converted had small fields here, and that caused issues. 
  2. Are the cookies local? In the settings table, look for the value 'localCookies', if it's not 1, change it to 1. Clear cookies for the site & retry.  If your prod site is in another folder on the same site, you may need to do the same to the prod site.  Local cookies enable you to have different cookies/sessions for applications in different folders on the same site. 
  3. We had a bug that caused 403s a few weeks ago.  If you have the current GitHub code, that's not it.  But if you had downloaded it a while back, please refresh it with current code.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Dave J

Quote from: shawnb61 on March 11, 2021, 01:13:36 PM
I don't think the Imagick issue is related.  I use HostGator & had the Imagick compilation error myself.  I opened a ticket, & they responded not to worry, it was just a red herring, & that the new version was backwards compatible.  I asked them to suppress the messages, which they did.

The first 3 things I would look at:
  1. What is the length of the password_salt field on your members record?  Some forums that were originally converted had small fields here, and that caused issues. 
  2. Are the cookies local? In the settings table, look for the value 'localCookies', if it's not 1, change it to 1. Clear cookies for the site & retry.  If your prod site is in another folder on the same site, you may need to do the same to the prod site.  Local cookies enable you to have different cookies/sessions for applications in different folders on the same site. 
  3. We had a bug that caused 403s a few weeks ago.  If you have the current GitHub code, that's not it.  But if you had downloaded it a while back, please refresh it with current code.

Thanks Shawn

I did check the tables all cookie settings are 1. As far as the length of the password_salt it's 32 characters, all 4 members are the same length

Without going into great detail what's changed fron RC2 to RC3? Because that's where my problem lies.

I'll get back to it again tomorrow.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Dave J

A brief update.

I have now installed RC3 on another host not affiliated with me at all and I get the same issue. I even used another browser for it too.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

shawnb61

Latest GitHub version, or the RC3 download from this site?
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Dave J

Quote from: shawnb61 on March 11, 2021, 02:08:17 PM
Latest GitHub version, or the RC3 download from this site?

RC3 from here. I thought there was a daily update from GitHub to here, so the latest version is always downloaded. If that's not the case I'll change it tomorrow and try again.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

shawnb61

Quote from: Dave J on March 11, 2021, 03:06:31 PM
I thought there was a daily update from GitHub to here, so the latest version is always downloaded. If that's not the case I'll change it tomorrow and try again.

No, that's not the case.  What gets loaded here is only the released version.  What is on GitHub is the current version, including any changes made post-release.  If something gets fixed, you either need to get the latest from GitHub or wait for the next release, e.g., RC4. 

Quote from: Dave J on March 11, 2021, 01:26:58 PM
Without going into great detail what's changed fron RC2 to RC3? Because that's where my problem lies.
There have been 2184 changes made since RC2...
https://github.com/SimpleMachines/SMF2.1/releases


It is very interesting you are seeing this on a fresh install, too, not just upgrades.  To me, this suggests more of a host or base config issue...

A few more things to try:
- A 403 can sometimes be a basic permissions issue.  It may help to double-check all the permissions on files & folders. 
- I believe we have seen a 403 caused by a mod_security problem.  It may help to ask the host to disable mod_security & see if the error goes away. 
- It may also help to purge all the sessions.  There is code where SMF issues a 403 if it is unhappy with the session.  It might help to just delete/purge them all.

If none of the above help, we may need to dive deeper into the exact config & settings...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

SleePy

Check your Settings.php and ensure that $auth_secret is there and populated.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Dave J

#27
Quote from: SleePy on March 11, 2021, 06:27:42 PM
Check your Settings.php and ensure that $auth_secret is there and populated.

Yes that was there and populated.

Quote from: shawnb61 on March 11, 2021, 06:16:40 PM
Quote from: Dave J on March 11, 2021, 03:06:31 PM
I thought there was a daily update from GitHub to here, so the latest version is always downloaded. If that's not the case I'll change it tomorrow and try again.

No, that's not the case.  What gets loaded here is only the released version.  What is on GitHub is the current version, including any changes made post-release.  If something gets fixed, you either need to get the latest from GitHub or wait for the next release, e.g., RC4. 

Quote from: Dave J on March 11, 2021, 01:26:58 PM
Without going into great detail what's changed fron RC2 to RC3? Because that's where my problem lies.
There have been 2184 changes made since RC2...
https://github.com/SimpleMachines/SMF2.1/releases


It is very interesting you are seeing this on a fresh install, too, not just upgrades.  To me, this suggests more of a host or base config issue...

A few more things to try:
- A 403 can sometimes be a basic permissions issue.  It may help to double-check all the permissions on files & folders. 
- I believe we have seen a 403 caused by a mod_security problem.  It may help to ask the host to disable mod_security & see if the error goes away. 
- It may also help to purge all the sessions.  There is code where SMF issues a 403 if it is unhappy with the session.  It might help to just delete/purge them all.

If none of the above help, we may need to dive deeper into the exact config & settings...

I hear what you're saying Shawn but it doesn't explain how RC2 works OK and RC3 doesn't. I had mod_security issues before on another host that's why I moved. It's never been an issue before on this host.

I have now wiped that install and I will try the GitHub version one more time. As I said before its not on a live site and I was only going to try the quiz out on it.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Dave J

Morning all.

Steps today 12.03.21

Delete current 2.1 install complete with tables. Upload 2.1 RC2 and install. On completion log in all ok

Upload to overwrite folders using nightly GitHub folders. (although in retrospect I don't know why I did 'Packages & Smileys')

Packages
Smileys
Sources
Themes

Failed to log.  Cookie error again.

Upload previous folders from RC2. Log in all OK. Noticed the error log had multiple errors (see attachment for errors)

Downloaded RC3 upgrade package from SMF. Uploaded upgrade package to overwrite existing files.

Ran 'upgrade.php' all upgrade completed. Log in error with cookie issue again.

Tried to log in from tablet with different browser and different IP still the same error.

Delete RC3 files and tables, re-install RC2. Log in OK. Stopped now.

The current setup is 2.1RC2 which is working fine with no errors. Immediate registration is set so if anyone wants to register and test please feel free to do so.

If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

shawnb61

Quote from: Dave J on March 11, 2021, 01:26:58 PM
As far as the length of the password_salt it's 32 characters, all 4 members are the same length

The password_salt is 255 characters on new installs...

Some old converted DBs have had issues, so we did a fairly recent change (after the RC3 release) to ensure it's OK. 

So...  Make sure you are using the latest from GH, and have run the upgrader.  Double-check that password_salt is 255 after doing so.

If this is the problem, then the RC3 download from simplemachines.org won't fix it.  The fix came after that build.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Dave J

Quote from: shawnb61 on March 13, 2021, 02:47:36 AM
Quote from: Dave J on March 11, 2021, 01:26:58 PM
As far as the length of the password_salt it's 32 characters, all 4 members are the same length

The password_salt is 255 characters on new installs...

Some old converted DBs have had issues, so we did a fairly recent change (after the RC3 release) to ensure it's OK. 

So...  Make sure you are using the latest from GH, and have run the upgrader.  Double-check that password_salt is 255 after doing so.

If this is the problem, then the RC3 download from simplemachines.org won't fix it.  The fix came after that build.

Thanks Shawn I'll check it out.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Dave J

I've downloaded the latest version from GH and installed it. No problems there.

I go to the members table and look at my password_salt and it's still only 32 characters.

I have attached the GH download and a snip of part of the table.

There really didn't seem any reason to run upgrade.php as these are the latest files
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Aleksi "Lex" Kilpinen

Did you actually install it fresh by running the installer? If you didn't, the upgrader is supposed to make the DB changes so yes, there is a reason to run it.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Dave J

Quote from: Aleksi "Lex" Kilpinen on March 13, 2021, 06:10:40 AM
Did you actually install it fresh by running the installer? If you didn't, the upgrader is supposed to make the DB changes so yes, there is a reason to run it.

Yes Lex. I downloaded the zip file from GH and uploaded that to the folder. Then ran the install.php. I couldn't log in by the way, I didn't mention that in the last post.

I have now re-installed RC2 and looking at the password_salt that is only 4 characters in RC2, see attachment, and I can log in.

I will now try and upgrade RC2 to the GH RC3 and see what happens.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Aleksi "Lex" Kilpinen

Thanks for confirming. I'll be testing this on my own as well, as now I'm curious.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Dave J

OK I have now run the upgrade.php to RC3 from RC2 using the files downloaded from GH.

Following the completed upgrade I went straight to the members table and the password_salt is still the same as it was in RC2 only 4 characters and the same ones too, as Shawn said it should upgrade it to 255 characters.

I cannot log in due to the cookie issue again. I have attached another snip showing it's definitely RC3.

I'm going to leave things as they are until I hear from one of you again.

If one of you wants to upload and test install on my host then let me know and I'll give you the FTP login details.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

lurkalot

Quote from: Dave J on March 11, 2021, 03:06:31 PM
Quote from: shawnb61 on March 11, 2021, 02:08:17 PM
Latest GitHub version, or the RC3 download from this site?

RC3 from here. I thought there was a daily update from GitHub to here, so the latest version is always downloaded. If that's not the case I'll change it tomorrow and try again.

If using the Nightly Builds from here, Download for nightly(github) smf2.1 then yes they are usually pretty much up to date.

Always pays to unzip the download and check the file called "last_commit_?xxxxxxx" contained within, there's a url in there which lets you compare what you just downloaded to what's on GitHub.  Example todays from the nightly builds https://github.com/SimpleMachines/SMF2.1/compare/89c3980...release-2.1  appears to be up to date with what you'd download from GitHub..

Dave J

#37
Quote from: lurkalot on March 13, 2021, 07:40:01 AM
Quote from: Dave J on March 11, 2021, 03:06:31 PM
Quote from: shawnb61 on March 11, 2021, 02:08:17 PM
Latest GitHub version, or the RC3 download from this site?

RC3 from here. I thought there was a daily update from GitHub to here, so the latest version is always downloaded. If that's not the case I'll change it tomorrow and try again.

"last_commit_?xxxxxxx" contained within

I've been through all the folders etc and there is no file 'last_commit' I did a search also and the only file with 'last' in it is the 'db_last_error' in the 'other' folder.

EDIT: OK I have found it now in the download from here it's not in the download from GH and that is the one I downloaded from GH
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Aleksi "Lex" Kilpinen

Okay, so far - I started with grabbing everything straight from Github yesterday, ran install and everything cool. Got a working install.
Was able to log in, and log out, password field is varchar 64, password salt is varchar 255 (the actual salt is shorter, but that's besides the point).

Guess I'll be working backwords now, and try the RC2 release version next, and upgrade it to that same Github snapshot from yesterday.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Dave J

Quote from: Aleksi "Lex" Kilpinen on March 14, 2021, 04:41:47 AM
Okay, so far - I started with grabbing everything straight from Github yesterday, ran install and everything cool. Got a working install.
Was able to log in, and log out, password field is varchar 64, password salt is varchar 255 (the actual salt is shorter, but that's besides the point).

Guess I'll be working backwords now, and try the RC2 release version next, and upgrade it to that same Github snapshot from yesterday.

Thanks again Lex it really is much appreciated.

I thought of other things that might affect it, so again I uploaded the latest version to my brothers web host Justhost and tried it again. This time instead of compressing the folder and extracting it with the cPanel file manager I uploaded the file via ftp and it still resulted in the same issue 'check cookies'.

I'm now thinking of getting my old laptop out and using that in case there is something that my desktop is changing when it either zips the folder or during the transfer process.

Not being a scratch coder it's very frustrating for me.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Advertisement: