Invalid Session

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
batbawls
Registered User
Posts: 3
Joined: Fri Dec 29, 2006 12:53 am

Post by batbawls »

darksnape wrote: HEEEELP!
THERE IS NO SOLUTION FOR THE PROBLEM YET! PHPBB KILLS ME! DO STH!


Open posting.php and add // before these lines:

// session id check
//if ($sid == '' || $sid != $userdata['session_id'])
//{
// $error_msg .= (!empty($error_msg)) ? '<br />' . $lang['Session_invalid'] : $lang['Session_invalid'];
//}


Open privmsg.php and add // before these lines:

// session id check
//if ($sid == '' || $sid != $userdata['session_id'])
//{
// $error = true;
// $error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['Session_invalid'];
//}

Not the best solution, but for now I think it's all there is.
camille1197
Registered User
Posts: 84
Joined: Tue Mar 29, 2005 4:51 pm
Contact:

Post by camille1197 »

Thank you - that has worked quite nicely!
km01grant
Registered User
Posts: 15
Joined: Sun Dec 01, 2002 6:40 pm

Post by km01grant »

I have a few on my board that are using Netscape and getting the error messages in posting and private messages. I knew about the problem with AOL users and when I had them use their IE's instead, the problem stopped. I don't understand why it doesn't work for the Netscape users unless they haven't actually tried IE.
kyle1745
Registered User
Posts: 173
Joined: Thu Nov 14, 2002 2:21 am

Post by kyle1745 »

Has there been any further information on this? I currently have a user seeing these errors...
burlingtonhawkeye
Registered User
Posts: 8
Joined: Fri Mar 04, 2005 11:45 pm

Post by burlingtonhawkeye »

I got the same message when updating from 2.0.21 to 2.0.22. I have a pretty standard install, no mods to speak of, just a few php tweaks here and there. Because of this, I use the patch file to do updates.

I don't know if this will help others, but this is what I did to fix the problem. When I ran the patch, one of the files didn't update properly. It was the usercp_register.php file, which was causing the problem. I went in and manually updated the lines, and the problem went away.

So... maybe patching a 2.0.21 install instead of updating any of the other ways will solve the problem.

It's just a suggestion, maybe I'm completely off base. It's worth a try, in any case.
imoore
Registered User
Posts: 26
Joined: Fri Feb 10, 2006 1:16 pm

Post by imoore »

I've just discovered I have the Invalid Session error when a new user tries to register - when you click the Submit button, you get the session error message. I've worked around it for now by commenting out the

Code: Select all

	// session id check
	if ($sid == '' || $sid != $userdata['session_id'])
	{
		$error = true;
		$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Session_invalid'];
	}
section in usercp_register.php. This isn't a big deal since the board is on our intranet so it's not accessible without a username & password, but it would be nice to fix it.
I have the Topic Calendar, Attachment and Easymod mods installed.
I've tried editing my previous usercp_register.php by hand with the 2.0.22 changes but it made no difference - I also can't see any problem in usercp_email.php so I don't know what's causing the problem.

Cheers,
Ian
visionquest99
Registered User
Posts: 441
Joined: Wed Sep 29, 2004 3:20 am
Location: Toronto

Post by visionquest99 »

batbawls wrote: Open posting.php and add // before these lines:

// session id check
//if ($sid == '' || $sid != $userdata['session_id'])
//{
// $error_msg .= (!empty($error_msg)) ? '<br />' . $lang['Session_invalid'] : $lang['Session_invalid'];
//}


Open privmsg.php and add // before these lines:

// session id check
//if ($sid == '' || $sid != $userdata['session_id'])
//{
// $error = true;
// $error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['Session_invalid'];
//}

Not the best solution, but for now I think it's all there is.


THANKS this is the only thing that's helped me stop the "invalid session. please resubmit form" error !!!!!
mommyneedsabreak.com
Registered User
Posts: 29
Joined: Sun Jan 21, 2007 1:54 am

Post by mommyneedsabreak.com »

batbawls wrote:
darksnape wrote:HEEEELP!
THERE IS NO SOLUTION FOR THE PROBLEM YET! PHPBB KILLS ME! DO STH!


Open posting.php and add // before these lines:

// session id check
//if ($sid == '' || $sid != $userdata['session_id'])
//{
// $error_msg .= (!empty($error_msg)) ? '<br />' . $lang['Session_invalid'] : $lang['Session_invalid'];
//}


Open privmsg.php and add // before these lines:

// session id check
//if ($sid == '' || $sid != $userdata['session_id'])
//{
// $error = true;
// $error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['Session_invalid'];
//}

Not the best solution, but for now I think it's all there is.


OMG! Thank you! I've been racking my brain tryin to fix this. THANKS!!!
User avatar
Kellanved
Former Team Member
Posts: 2635
Joined: Wed Jan 26, 2005 2:48 pm
Location: Meta-level

Post by Kellanved »

I'll just re-iterate: that does not fix the issue (which usually is either AOL or a - if it happens to all users - a broken update), but takes away the symptom at the cost of adding a security problem.
Nocando is in Idontwanna county. No support via PM
oisleep
Registered User
Posts: 56
Joined: Tue Feb 21, 2006 9:35 am

Re: Invalid Session

Post by oisleep »

i'm only getting one user (out of roughly 100 a day) who gets this problem, they are using that TOR anonomity thing, could this be related to the problem?
carley
Registered User
Posts: 69
Joined: Mon May 22, 2006 11:12 am

Re: Invalid Session

Post by carley »

I am also getting this problem for some users posting on the boards since upgrading...
INVALID USER SESSION PLEASE RE SUBMIT


Can someone tell me what code I need to hide on posting.php file to fix the problem?

Also, if users are using AOL & Explorer - did moving to Firefox fix the problem?
User avatar
beggers
Registered User
Posts: 1257
Joined: Fri Nov 23, 2001 8:19 pm
Location: Las Vegas
Contact:

Re: Invalid Session

Post by beggers »

I had people reporting the invalid session, resubmit form error since I upgraded to .22. I reluctantly commented out the session check code but this seems like a ready bad "fix". The board worked fine on all browsers before the upgrade.
Locked

Return to “2.0.x Support Forum”