News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

session timed out preventing login

Started by stog, June 28, 2023, 06:40:13 AM

Previous topic - Next topic

stog

Hi all

just set up new 2.1 installation yesterday (default theme)

no mods installed
however

while trying to prevent Login appearing when linking back to the Forum from a direct link out (from a Board link to another part of the directory -- an index.html) I clicked "enable local storage" in server settings/cookies (which allowed link back to the forum to not contain log in dialogue - if I was already logged in!

also disabled 2 factor security!

However today while testing from my phone, adding a board & altering a board permission to guest access, within a Category restricting access to global & admin (possibly creating a problem)

I found myself in a session timed out while posting and also preventing login

returned to my desktop

enabled maintenance mode from ftp, looked at repair_settings and was considering administrate.php if i can find where to download it

I have had a look at other threads with this session timed out problem, but suspect I need to unclick local storage of cookies, but can't get in to administer.

Please advise before I mess things up further

Many thanks

stog

update -- sorted

i seem to be able to log in ok on my iphone now but not the desktop (mac/firefox)
errors showing are 2: undefined array key "total time logged in"  subs.php line 4339 so am looking into this

ok

have unchecked local storage for cookies

and can now log in ok

& for the initial problem -- have changed the link back to the forum to http://xxx without the www    or without only linking by index.php

hope this helps others

Kindred

you have one URL for your forum - either with www or without.
You need to set your htaccess to automatically redirect anyone who uses the wrong one to the correct one.

If you turn on local cookies, then it makes the problem worse...   
if you turn on subdomain independent cookies, then it solves part of the problem -- but you should still use htaccess -- and you can't have both local and subdomain independent cookies on at the same time.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

.htaccess


# 301 REDIRECT HTTP TO HTTPS AND WWW TO NON-WWW
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
</IfModule>

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

stog


Advertisement: