Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 2 of 2
Increase backend session timeout
 
Bill Stender
Jr. Member
 
Total Posts:  9
Joined:  2009-10-19
 

yeah, i wasted time on that one as well.  iow, it doesnt work.

so i went with suggestion #12.  so far, so great!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Aftab Naveed
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2009-05-12
Sydney Australia
 

If you have configured php to run as CGI or FastCGI or SUPHP then you might want to place local php.ini file in site root folder
and increase the session life time.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ggchamp
Sr. Member
 
Total Posts:  153
Joined:  2009-04-30
 

Ok i found a few other placed where the number is set to 3600 hopefully increasing these will solve the issue that all the worked by us have been complaining about…

/code/core/Mage/Core/Model/Cookie.php
  $lifetime 
3600
increased this one..
  
./
code/core/Mage/Core/etc/config.xml
           
<cookie_lifetime>3600</cookie_lifetime>
I increased this one as well
                
./code/core/Mage/Api/etc/config.xml
<session_timeout>3600</session_timeout>

And 
this one as well
Ill post my results soon as to how effective this was i am working on 1.32, every other solution just didnt work!
 
Magento Community Magento Community
Magento Community
Magento Community
 
Kara Heinrichs
Guru
 
Avatar
Total Posts:  482
Joined:  2008-01-17
aa, mi, us
 

I don’t have a CEv1.3 installation currently to verify, but in CEv1.4 and above, just go to ADMIN: System> Configuration> Admin tab. In the Security panel, you can set the “Session Lifetime” to something higher.  By default, I believe it’s set to something like 15 minutes (900 seconds).  Just set it to something comfortably high (in seconds) so that the Admin Panel doesn’t time out on you during development. Then dial it back down when you move the site into production.

I don’t recall when this feature became available and it may or may not be an option in v1.3, but check just in case.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sosonbobo
Jr. Member
 
Total Posts:  1
Joined:  2011-05-02
 

This helped me, but I want to share one experience. Even though I set this configuration value it did not make any change. The problem was that the admin has to run as

$mageRunCode = ‘admin’;
$mageRunType = ‘store’;

Set this in index.php for example like this:

if ( preg_match(’/’.$baseUrl.’admin/’, $url) or preg_match(’/’.$baseUrl.’index.php\/admin/’, $url) )
{
$mageRunCode = ‘admin’;
$mageRunType = ‘store’;
}

where $url is current url and $base url is escaped base url (escaped slashes and dots) otherwise it won’t work.

igloo-x - 06 May 2009 06:00 AM

admin panel:
system -> advanced -> admin -> security
Enter value for: “Session Lifetime, Seconds”


I haven’t tested this yet,
but it should produce the desired results according to the following code in: app\code\core\Mage\Core\Model\Session\Abstract\Varien.php

if (Mage::app()->getStore()->isAdmin()) {
$adminSessionLifetime = (int)Mage::getStoreConfig(’admin/security/session_cookie_lifetime’);
if ($adminSessionLifetime > 60) {
Mage::getSingleton(’core/cookie’)->setLifetime($adminSessionLifetime);
}
}

 
Magento Community Magento Community
Magento Community
Magento Community
 
Marcosi
Jr. Member
 
Total Posts:  15
Joined:  2012-01-20
 

This thread has not been used for a long time. Did some of the suggestions work? I don’t manage to change my timeout on the backend drom admin.

 
Magento Community Magento Community
Magento Community
Magento Community
 
magento_marc
Jr. Member
 
Total Posts:  2
Joined:  2010-02-05
 

I am looking to change the timeout for only one particular admin user. Is that possible? We have a computer at our shop in a secure location that we basically want logged in all the time. However I don’t want admins who login remotely to have a long time out. Any suggestions?

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiefair
Mentor
 
Avatar
Total Posts:  1848
Joined:  2009-06-04
 

Often none of the suggestions work because it’s also dependent on your internet connection.

In that case, “just deal with it” ends up being the solution.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ottom
Member
 
Total Posts:  54
Joined:  2011-02-25
 

This is great. So many solutions, so many suggestions. Nothing works for sure. Nobody knows for sure. Reverse engineering everywhere…
What the ...?!

According to post #13 there is the function getLifeTime in Mage/Core/Model/Mysql4/Session.php, correction: Mage/Core/Model/Mysql4/Ressource/Session.php (the same php-file in the folder above is empty).

in function getLifeTime I placed the following:

print ini_get(session.gc_maxlifetime);
exit;

I have tried logging in and out and never experienced Magento\’s white-screen with the output. It is as if the function is not used at all in my case. In my configuration sessions are saved in the file system. I have emptied the folder and tried again - no white screen!

So, what are the two backend settings for in General > Web and Advanced > Admin?

 
Magento Community Magento Community
Magento Community
Magento Community
 
spacecat
Jr. Member
 
Avatar
Total Posts:  1
Joined:  2012-12-11
Brisbane, Australia
 

session.gc_maxlifetime is the amount of time that PHP keeps the session information.

Increasing the session cookie lifetime is also needed. You might have th3e cookie in your browser, but if the data has been wiped from the server you got NUTTIN’

 
Magento Community Magento Community
Magento Community
Magento Community
 
xigen_ash
Jr. Member
 
Total Posts:  6
Joined:  2013-08-12
 

I know this is an old topic, but it’s still a problem and still possible to reach this thread.  The biggest problem with this thread is that nobody actually understands what they’re trying to solve.  This is where I will explain a few things:

First and foremost session.gc_maxlifetime is a php.ini configuration setting for _SESSION.  How PHP and sessions work is simple - the client (you) has a cookie set with SESSID (configured in php.ini also), the session is kept for the duration set in session.gc_maxlifetime so long as your cookie is still valid your sessions are too (to an extent).

The 15 minute time-out occurs because the cookie is expiring, losing your SESSID, losing your session - that’s the problem.  Increasing the session limit (server side) changes nothing for the cookie limit (client side).

This is a test on the latets 1.8.1.0 version of Magento CE.  As previously mentioned in this thread there are two cookie limits:

Frontend - System > Configuration > General > Web > Session Cookie Management - Default if an hour 3600 seconds.
Adminhtml - System > Configuration > Advanced > Admin > Security > Session Timeout = default is empty.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 2