ElkArte Community

Project Support => General ElkArte discussions => Topic started by: kucing on August 17, 2014, 11:10:48 pm

Title: Cannot login or logout
Post by: kucing on August 17, 2014, 11:10:48 pm
Hi, I moved my forum to another hosting (from shared hosting to VPS) now I cannot login or logout. There is a message "
Session verification failed. Please try logging out and back in again, and then try again."

Any suggestions?

Edit:
I cannot access the admin page because of the same error.
Title: Re: Cannot login or logout
Post by: ahrasis on August 18, 2014, 01:42:00 am
Have you try to rename your cookies? Somebody could have eaten it. ;)
Title: Re: Cannot login or logout
Post by: emanuele on August 18, 2014, 03:10:36 am
I would try first disabling any accelerator enabled (just edit Settings.php and make sure $cache_accelerator is empty: '').
Also rename cookies doesn't hurt.

If that doesn't solve, you may try changing the setting (at the moment I don't remember the name, I'll tell you once I am in front of a computer :P) to use database driven sessions.
Title: Re: Cannot login or logout
Post by: kucing on August 18, 2014, 03:21:34 am
Quote from: ahrasis – Have you try to rename your cookies? Somebody could have eaten it. ;)
How do I change it?

I deleted the cookies on my browser (Firefox), trying to login and it failed with the same error.
Quote from: emanuele – I would try first disabling any accelerator enabled (just edit Settings.php and make sure $cache_accelerator is empty: '').
Also rename cookies doesn't hurt.

If that doesn't solve, you may try changing the setting (at the moment I don't remember the name, I'll tell you once I am in front of a computer :P) to use database driven sessions.

Okay, I will report it later.

Thanks!
Title: Re: Cannot login or logout
Post by: ahrasis on August 18, 2014, 03:35:17 am
Cookies. Find it in Admin CP > Configuration > Server Settings > Cookies & Sessions. Change cookies name there. Below is database driven session. Tick to enable.
Title: Re: Cannot login or logout
Post by: kucing on August 18, 2014, 03:47:20 am
Quote from: ahrasis – Cookies. Find it in Admin CP > Configuration > Server Settings > Cookies & Sessions. Change cookies name there. Below is database driven session. Tick to enable.

Welp :( I cannot use the admin page, it will ask for password and then the same error showed up. I changed the cookies name manually via Settings.php, is this the same thing? The result is nothing fixed. Haha...

While changing the cookies I found that the absolute path need to be modified to the new folder structure and still not fixed.

Maybe clean install?

Thanks!
Title: Re: Cannot login or logout
Post by: emanuele on August 18, 2014, 04:01:17 am
Quote from: kucing – While changing the cookies I found that the absolute path need to be modified to the new folder structure and still not fixed.

Maybe clean install?
Not really necessary, just fix the paths in Settings.php: you can replace the old ones with the new. ;)
And then do the same in the themes admin page (if you want in one of the repos, I can point you to the correct one) there is a "repair_settings.php", though it may or may not work at the moment, it has to be tested, and test it in your "emergency" situation is not ideal... :-\
Title: Re: Cannot login or logout
Post by: kucing on August 18, 2014, 04:28:06 am
The fix is using admin page? :( I cannot use it because of the same error.
Title: Re: Cannot login or logout
Post by: emanuele on August 18, 2014, 04:42:36 am
The themes paths are not causing that problem (probably part of the other), so, when you will be able to log in then you can fix the theme paths. ;)
Title: Re: Cannot login or logout
Post by: kucing on August 18, 2014, 10:41:55 am
Quote from: emanuele – The themes paths are not causing that problem (probably part of the other), so, when you will be able to log in then you can fix the theme paths. ;)
Already fixed absolute path in Settings.php and now I don't know what should I do next to try to fix it. Feels like I bite more than I can chew. Haha :D
Title: Re: Cannot login or logout
Post by: emanuele on August 18, 2014, 12:00:10 pm
hmm... know basically nothing about nginx, so let's try guessing a bit.
Can you install apache and see if with that works?
That would allow to discover if nginx has anything to do with the problem. ;)
Title: Re: Cannot login or logout
Post by: emanuele on August 19, 2014, 09:46:50 am
Let's also do this: @Spuds do you know if nginx can interact with sessions and make them unhappy?

Also @kucing can you check via phpMyAdmin the table elkarte_log_errors if there is something that can be related to the sessions issue?
Title: Re: Cannot login or logout
Post by: Spuds on August 19, 2014, 11:13:08 am
I've used nginx (good choice) on several sites and not had any session errors due to something it was doing.

You should check your nginx access log for the site as well as the php error log to see if an error is being generated.  Most issues with Nginx tend to be with permissions.

As already said, if you are using APC make sure you set the cache engine to '' as a test.  We had a problem with APC and sessions but that should be fixed (and if you are using php 5.5+ you should not be using APC as the op-cache anyway)

Title: Re: Cannot login or logout
Post by: kucing on August 21, 2014, 12:01:34 am
Thanks for the instruction Spuds!  I already disabled caching by modifying settings.php but it still won't work. I will focus to fix this problem first.
Title: Re: Cannot login or logout
Post by: kucing on September 08, 2014, 09:03:13 pm
Hi everyone, I succeeded to fix it. It's because of nginx pagespeed module. I turned it off and now I can login or logout. :D

Sorry it took a long time, I just fixed it now. Haha..
Title: Re: Cannot login or logout
Post by: emanuele on September 09, 2014, 08:03:23 am
Thanks for reporting the solution! ;D