Advertisement:

Author Topic: Session timeout on small login.  (Read 528 times)

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 519
  • Gender: Male
    • Satellite Fun
Session timeout on small login.
« on: December 06, 2017, 06:14:51 PM »
On one of the forums, when trying to login, we get this error instantly:
Quote
Fout bij het versturen van het formulier. Sessie timeout.
Which is translated something like "Error when sending the form. Session timeout".

This is odd, because when I look at the apache logs, it just gives a http 200 which means all is ok, like this:
Code: [Select]
84.xx.xx.xx - - [07/Dec/2017:00:02:26 +0100] "POST /forum/index.php?action=login2 HTTP/1.1" 200 2989 "http://www.hobbyforum.org/forum/index.php?action=login2" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0"
However, when we click the other login option in the bar where also the "help" and "New Posts" "Register" etc. is resided, then logging in doesn't give any problems.

I've seen this before, but I don't remember the cause of it.

SMF 2.0.15 with updated language packs. :)
Apache/2.2.31
Php 5.5.34 :( yeah I know, new server is being configured right now. Owner was lazy.
mysql 5.5.52

Installed mods:
Code: [Select]
1. Child Board Removal 1.0
2. My Posts SMF2 1.2
3. Redirection Topics 1.0.3
4. Remove "Last edit" mod 0.2.5
5. Like Posts 2.0.2
6. SMF 2.0.15 Update 1.0
7. Project Snow 1.2 1.2
8. Birthday On Register 1.0
9. Contact Page 3.2

How can it be fixed so the smaller login option can be used too again?
Greetings, Black Tiger

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,032
    • Arantor on GitHub
Re: Session timeout on small login.
« Reply #1 on: December 06, 2017, 06:47:01 PM »
Link?
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 519
  • Gender: Male
    • Satellite Fun
Re: Session timeout on small login.
« Reply #2 on: December 06, 2017, 06:51:35 PM »
That's duckfiles.org.
Greetings, Black Tiger

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,072
  • 'Tis the gift to be simple
Re: Session timeout on small login.
« Reply #3 on: December 06, 2017, 10:02:01 PM »
Check for this in your theme's index.template.php -

Code: [Select]

<input type="hidden" name="hash_passwrd" value="" />
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />


You need both lines or you'll get session timeouts.


Offline Raths Rants

  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
  • Just goofing off...
    • @Carrissis on Twitter
    • The Day Dreamers Consortium Network
Re: Session timeout on small login.
« Reply #4 on: December 07, 2017, 02:13:38 AM »
Thanks! I was having the same issue. Fixed like a charm  ;D

Check for this in your theme's index.template.php -

Code: [Select]

<input type="hidden" name="hash_passwrd" value="" />
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />


You need both lines or you'll get session timeouts.
The DDC Network
a lot of hard work goes into easy
Looking for feedback on my site, see it in the Showcase Board

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 519
  • Gender: Male
    • Satellite Fun
Re: Session timeout on small login.
« Reply #5 on: December 07, 2017, 08:55:38 AM »
Hmmz... I don't know who marked this topic solved, but I should have been the one, since I started the thread and it could have been something else, one never knows. :D
But no harm done.

@Sir Osis of Liver: Thank you very much, the second line was missing, fixed now! ;)
Greetings, Black Tiger

Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 48,048
Re: Session timeout on small login.
« Reply #6 on: December 07, 2017, 08:57:10 AM »
Hmmz... I don't know who marked this topic solved, but I should have been the one, since I started the thread and it could have been something else, one never knows. :D
But no harm done.
it gets confusing when someone else comes into the topic and says this solved the issue. sorry it got marked solved ahead of time.

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 519
  • Gender: Male
    • Satellite Fun
Re: Session timeout on small login.
« Reply #7 on: December 07, 2017, 09:12:44 AM »
It can get confusing indeed. But as stated, no harm done in this case. ;) It was quite a clear solution and I'm glad somebody else is helped too with it.
Greetings, Black Tiger

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,095
  • Gender: Male
    • Kindred-999 on GitHub
Re: Session timeout on small login.
« Reply #8 on: December 07, 2017, 06:34:20 PM »
incidentally, there is an FAQ on this specific issue... :P
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 519
  • Gender: Male
    • Satellite Fun
Re: Session timeout on small login.
« Reply #9 on: December 07, 2017, 06:51:08 PM »
Interesting. Pity you forgot to link to it. :D
Greetings, Black Tiger

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,095
  • Gender: Male
    • Kindred-999 on GitHub
Re: Session timeout on small login.
« Reply #10 on: December 07, 2017, 08:42:25 PM »
Or maybe I expected someone to be able to click a few links and get there himself?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 519
  • Gender: Male
    • Satellite Fun
Re: Session timeout on small login.
« Reply #11 on: December 07, 2017, 09:10:13 PM »
Maybe that someone already checked the wiki and some faq's and did not find anything? Except for that one is supposed to mark thread solved if it's solved?
I searched for the word "solved", and since I did nothing wrong, a bit of service by pointing to it would be welcome.;)
Who says A also should say B or say nothing at all is a common way of saying in our contry. 8)
Greetings, Black Tiger

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,095
  • Gender: Male
    • Kindred-999 on GitHub
Re: Session timeout on small login.
« Reply #12 on: December 07, 2017, 09:43:54 PM »
https://wiki.simplemachines.org/smf/Login_error_2.0.14

I have no idea what your last post even meant...  but as I am often working from a phone, posting links can be a pain
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,032
    • Arantor on GitHub
Re: Session timeout on small login.
« Reply #13 on: December 08, 2017, 02:36:50 AM »
Except this is a 2.0.15 forum, it's not obvious that the problem could continue to occur.

I should write a patch that fixes it in all custom themes sometime, it's possible to do.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 519
  • Gender: Male
    • Satellite Fun
Re: Session timeout on small login.
« Reply #14 on: December 08, 2017, 07:01:58 AM »
@Arantor: That would be nice.

@Kindred: Oh from the phone, that makes life a lot more difficult indeed. Didn't know that you were most using the phone.
However, since your reply was stated at a late point after the topic was already marked solved, I thought you were referring with your reply to the "mark topic solved" comments in the thread, so it was not clear to me you were referring to the login issue.
I searched for "session timeout" which is the error notice, not for "login error" as it was possible to login via the other login option, so that's why I couldn't find it in the faq.
Greetings, Black Tiger

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,095
  • Gender: Male
    • Kindred-999 on GitHub
Re: Session timeout on small login.
« Reply #15 on: December 08, 2017, 11:34:09 AM »
Good point, updated the faq entry
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 519
  • Gender: Male
    • Satellite Fun
Re: Session timeout on small login.
« Reply #16 on: December 08, 2017, 11:44:51 AM »
Great, good job!
Greetings, Black Tiger

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,072
  • 'Tis the gift to be simple
Re: Session timeout on small login.
« Reply #17 on: December 08, 2017, 12:04:04 PM »
Except this is a 2.0.15 forum, it's not obvious that the problem could continue to occur.

I updated my two production forums, and a client forum, from 2.0.13 -> .14 -> .15, session check was added correctly to login on all three.


Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,032
    • Arantor on GitHub
Re: Session timeout on small login.
« Reply #18 on: December 08, 2017, 12:11:35 PM »
It sometimes will be, but there's plenty of places where it won't for whatever reason - and an FAQ page called "login error 2.0.14" isn't obviously relevant to 2.0.15.

I find it interesting that a single fix of maybe two dozen lines of code could fix every theme and plugin including things like portals. But playing with the output buffer isn't for the faint of heart.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.