Error "Invalid Session. Please resubmit the form."

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
Locked
torbengb2
Registered User
Posts: 5
Joined: Wed Jan 17, 2007 10:34 pm
Contact:

Error "Invalid Session. Please resubmit the form."

Post by torbengb2 » Wed Jan 17, 2007 11:01 pm

1) phpbb.com username inactive:
I could not log on here with my username "torbengb" and the "forgot password" feature replied "Sorry, but your password cannot be retrieved because your account is currently inactive. Please contact the forum administrator for more information." It did not specify how to contact the admin? So I made a new username "torbengb2".

2) "Invalid Session. Please resubmit the form."
Your phpBB board URL: http://fingerfans.dreamhosters.com/forum/
Template(s) used: default "subSilver" without any changes.
Any and all MODs: none.
Do you use a port of phpBB: no.
Version of phpBB: 2.0.22
Version of PHP: 5.1.2
Which database server and version: mySQL 4.1.14-Debian_5-log
Host: www.dreamhost.com
Did someone install this for you/who: DreamHost one-click automatic install
Is this an upgrade/from what to what: was 2.0.21; one-click upgraded to 2.0.22
Is this a conversion/from what to what: none.
Have you searched for your problem: yes
If so, what terms did you try: Invalid Session
Do you have a test account for us: no, but a new one can be created as needed.
State the nature of your problem:
We were using the unmodified phpBB and suddenly on post submit it says "Invalid Session. Please resubmit the form."
I tried deleting my cookies, tried with a different browser (FF2, IE7), but it keeps giving this message.
It seems to work fine on 1 other computer, so possibly the issue is the PC and not the website. I can't determine this as I've run out of computers.
What can cause this error message and how to solve it?

espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom » Thu Jan 18, 2007 5:50 am

"One click" installs and updates are not supported here, because the people who modified them to be "one click" have made unknown changes.

That said, the "invalid session" problems have been tied to two things - templates that were not updated for 2.0.22, and "quick reply" MODs that have not been updated. Neither issue would be addressed by the typical "one click".

I suggest you go to the Update PHPBB via MOD format page, and download the instructions for the 2.0.21-to-.22 update, and apply all the changes listed for files in the templates/subSilver directory to the same file names in your chosen template. If you have a QR MOD, then visit the topic where that MOD is supported, and you will probably find a fix already posted for 2.0.22 compatibility.
Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer

mike16os
Registered User
Posts: 39
Joined: Wed Nov 29, 2006 9:55 pm

Post by mike16os » Thu Jan 18, 2007 6:09 am

If you have access to phpMyAdmin. Try from there.
1.Click phpbb_users table
2.Click Browse menu
3.Edit your user data user_active 0 to 1

Image

I hope it helps you.

torbengb2
Registered User
Posts: 5
Joined: Wed Jan 17, 2007 10:34 pm
Contact:

Post by torbengb2 » Thu Jan 18, 2007 10:37 am

Espicom, thank you. I checked all the changes 2.0.21>22 and they were already proporly there, no changes by me were needed.
Mixe16os, thanks. The admin and my own account are both user_active=1, no changes needed.

I still experience this issue. Any further ideas? Your help is appreciated! :)

What puzzles me is that this started all of a sudden; not right after an upgrade or any code changes.

User avatar
karlsemple
Former Team Member
Posts: 39802
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK
Contact:

Post by karlsemple » Thu Jan 18, 2007 10:40 am

You can not register for your forum either as the anonymous user is not present by the looks of it run this script

Code: Select all

<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
$page_title = 'phpBB Fix';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$sql = "INSERT INTO " . USERS_TABLE . " (user_id, user_active, username, user_password, user_session_time, user_session_page, user_lastvisit, user_regdate, user_level, user_posts, user_timezone, user_style, user_lang, user_dateformat, user_new_privmsg, user_unread_privmsg, user_last_privmsg, user_emailtime, user_viewemail, user_attachsig, user_allowhtml, user_allowbbcode, user_allowsmile, user_allowavatar, user_allow_pm, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_rank, user_avatar, user_avatar_type, user_email, user_icq, user_website, user_from, user_sig, user_sig_bbcode_uid, user_aim, user_yim, user_msnm, user_occ, user_interests, user_actkey, user_newpasswd) VALUES('-1', '0', 'Anonymous', '', '0', '0', '0', '1082539867', '0', '0', '0.00', NULL, '', '', '0', '0', '0', NULL, '0', '0', '1', '1', '1', '1', '0', '1', '0', '1', '0', NULL, '', '0', '', '', '', '', '', NULL, '', '', '', '', '', '', '')";
if( (!$result = $db->sql_query($sql)) )
{
   message_die(CRITICAL_ERROR, "Error inserting anonymous user data", "", __LINE__, __FILE__, $sql);
}
else {echo '<table width="80%" class="forumline"><tr><td>The anonymous user was missing, and has successfully been added</td><tr></table>';}

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Image

torbengb2
Registered User
Posts: 5
Joined: Wed Jan 17, 2007 10:34 pm
Contact:

Post by torbengb2 » Wed Feb 07, 2007 8:19 pm

Thank you Karl. I don't know how to execute PHP directly but I took the SQL statement and successfully ran it on my 'forum_users' table, then manually checked that it was inserted correctly. But it didn't fix my problem; I still get "Sorry, but this username has already been taken." when I click on "I Agree to these terms...".

mike16os suggested to set user_active from 0 to 1. My user already had value 1 here. I did this on the user Anonymous, but it also didn't fix the issue. What is the default (out-of-the-box) value of this item for the user Anonymous?

I also did a new complete install, exactly identical to this one (DreamHost one-click install) and compared the PHP files; they are exactly identical (except for our little banner at the bottom) so I conclude that it's not the files that are somehow broken, but some (missing?) database entries?

With the above in mind, can you help me with a next step to try? Thank you for your help!

torbengb2
Registered User
Posts: 5
Joined: Wed Jan 17, 2007 10:34 pm
Contact:

Post by torbengb2 » Wed Feb 07, 2007 9:45 pm

torbengb2 wrote: What is the default (out-of-the-box) value of this item for the user Anonymous?

Default for "user_active" is "0" for Anonymous and "1" for my own username (as seen in my fresh install).

torbengb2
Registered User
Posts: 5
Joined: Wed Jan 17, 2007 10:34 pm
Contact:

Post by torbengb2 » Sat Feb 10, 2007 12:14 pm

It seems to work now! I didn't change anything since last post, but perhaps a server cache got flushed in the meantime or something...

Thanks to all for your friendly help!!

Locked

Return to “2.0.x Support Forum”