5

I am new to Magento, and have some issue with the admin panel. For some reason, I keep being disconnected from the admin panel, which makes it really hard to change what I want on the website, as I will most of the time have to do it at least twice because I've been disconnected the first times.

Sometimes it disconnect me as soon as I change the page I'm on, some other times I'm be able to stay logged in for a good 15-20 minutes without any issue.

What I've done to try and resolve it

  • Changed the cookies duration
  • Changed the cookies path
  • Cleared the cache / session folders of Magento
  • Cleared the cookies / cache of my browsers

My cookies storage informations in my DB now looks like that core_config_data tables related to "cookies"

Do you guys have any idea of what may be causing this issue?

Even if you don't know, thank you for reading this far :)

3

Try set custom value to php session lifetime in php.ini
eg.
session.gc_maxlifetime "3600"

|improve this answer|||||
  • I just realized that the website is on a shared server, which means I don't have access to the php.ini file. Do you know of any other way I could change the cookie lifetime ? Right now it's at zero i.imgur.com/jTwO1YM.png – Tokipudi Jan 31 '17 at 14:12
  • In .htaccess in root category of project add php_value session.gc_maxlifetime "3600" line – Konrad Siamro Jan 31 '17 at 14:17
  • I thought it worked as it didn't disconnect me for some time yesterday night, but it still does it now. It's really frustrating as I can't work properly because of it. Do you know of any other way I can deal with it without switching for a non-shared host ? – Tokipudi Feb 1 '17 at 11:51
  • Try oscprofessionals answer, You can also try store your session in db. You can change it in env.php – Konrad Siamro Feb 1 '17 at 12:01
  • 1
    After trying everything I found on the internet, plus you people answers to my issue without any luck, I changed the session storage so it stores it in the DB and now it seems to work fine. I don't know if it's gonna last, as I'v already had false hopes when trying other solutions, so I'll tell you tommorow probably. Thanks :) – Tokipudi Feb 2 '17 at 13:08
2

Magento (v2.2) was logging me out any time I tried to go to any other configuration tab in admin. Apparently it was a static signing issue.

I turned static signing off via the database, since I couldn't access the setting by clicking through the admin menus.

To do this go to 'core_config_data', then find the path named 'dev/static/sign' and set the value to '0'.

Once I changed it (with developer mode enabled) I was able to access admin config setting normally.

|improve this answer|||||
0

Increase the session timing of magento admin by following this link.

Follow all answers and this will surely help you.

|improve this answer|||||
  • Thanks for the answer. I have done what the first comment says and it shows me this i.imgur.com/jTwO1YM.png Do you know how I can change these variables please ? I never had to do anything like that in the past (I already changed the session settings from the admin panel, I just forgot to say it in my post, sry) – Tokipudi Jan 31 '17 at 13:45
0

If your Magento is within a subdirectory (e.g. Alongside Wordpress), make sure you set this directory in the Cookie Path field, starting with the /.

I would also suggest you empty all the cookies of this domain in your browser.

|improve this answer|||||
0
  1. Check your server timings.
  2. Make sure that nowhere in code some other time zone has been hard coded which might result in Magento calculating a wrong time and this will mean in session expire which in turn will mean in you getting logged out.All time zone settings to be via admin configuration only(increase session time to 24 hrs just to get an idea if this is the issue as with increased expire time this getting logged off will not happen ).
  3. Disable modules installed and then check.
  4. Check if session ID is not getting changed.
|improve this answer|||||
0

It may be an issue with PHP settings.

php --ini

Try to set memory_limit parameter to 2GB or more in the appropriate php.ini file.

Restart your server (apache/nginx).

|improve this answer|||||
0

Log into the database and run:- update core_config_data set value='my.domainname.com' where path='web/cookie/cookie_domain';

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.