Clan Adverts

Invalid Sessions Error? How to fix that.

Description: Most of you have ran into the oh very popular "invalid session please resubmit the form". Especially for new registries and people trying to post on your forums. It is usually caused by the cookies and I will go over how to fix that for ya.
Version: 1.0
Added on: 16 June 2009
Author: DreAdeDcoRpSE
Difficulty Level: Easy
Views: 3739
Detailed Profile

Most of you have ran into the oh very popular "invalid session please resubmit the form". Especially for new registries and people trying to post on your forums. It is usually caused by the cookies and I will go over how to fix that for ya. I figured I would put this in here since I have answered this problem many times in the forums and seems to be and issues with many people.

Please Read and adjust your forum cookie settings accordingly.

PLEASE READ THESE STEPS VERY CAREFULLY

If you are still getting the invalid session errors after these changes clear you cookies. If your still getting the error check your settings again.

Everyone that I have helped with this issue that has claimed that they did it correctly but still gets the errors had their cookie settings wrong. Wouldn't you know fixing them made the errors go away.

Please note that the use of an IP address will NOT work. You must have a proper DNS entry with a TLD.

NOTE: The cookie name is now important
If you get url or cookie validation errors overrule them as the config they were built on no longer work. So keep clicking yes.
This will fix the invalid session error.
You may also have to clear you cookies.

If your cookie name is longer than the field allows for

Code:

Open
modules/Forums/templates/subSilver/admin/board_config/board_cookies.tpl

Find:
maxlength="16"

Replace with:
maxlength="255"



Secure cookie should be off

Your site is on the root of a domain
Example URL: http://www.mysite.com / http://mysite.com
Cookie domain: .mysite.com (Note the period before the name)
Cookie name: mysite (The cookie name MUST match exactly your domain without the suffix)
Cookie path: /

Your site is on subdomain
Example URL: http://nuke.mysite.com
Cookie domain: nuke.mysite.com
Cookie name: mysite (The cookie name MUST match exactly your domain without the suffix)
Cookie path: /

Your site is in a sub folder
Example URL: http://www.mysite.com/nuke/
Domain Name: www.mysite.com
Script Path: /nuke/modules/Forums/
Cookie domain: .mysite.com (Note the period before the name)
Cookie name: mysite (The cookie name MUST match exactly your domain without the suffix)
Cookie path: /nuke (Note there is no / at the end)


Once all said and done, save the new settings and clear your cookies and refresh, problem should be fixed for you and your users. If anyone continues to have the problem, then have them clear there cookies and try again.