GoMage Updates

Session Files: How to Configure and Store

Apr 1, 2015 1 min read 590 views
Listen audio
Session Files: How to Configure and Store

When online merchants make their first steps working with Magento ®, they have to spend a great deal of time configuring the admin panel, setting desired parameters, installing extensions, uploading products into the catalog.

Sometimes, their session expires and interrupts the work, which makes them re-login and start anew.

However, it is quite easy to configure the session lifetime. Go to System → Configuration → Admin → Security → Session Lifetime and set the desired time. It is important to remember that time is counted in seconds on the server. So, the value 1800 (seconds) will allow you work in the admin panel for 30 minutes.

All sessions are stored in the file system by default. This is very convenient for users. Besides, all sessions can be checked using FTP access to the server. However, there is one significant disadvantage in this way of session storage: after some time, the number of files may exhaust allowed server space. The path of the storage is specified in local.xml file:

 

<session_save><![CDATA[files]]></session_save>

 

The users may choose to save the session files in the database. The database is stable even in case of unexpected system downtimes or overloads. But, when this method of data storage is used the general system load is increased. So, this way is better for small online stores, since the stores with a large number of products may encounter MySQL server performance issues.

In order to set the path of the session files storage it is necessary to access app/etc/local.xml file and add the following:

 

<session_save><![CDATA[db]]></session_save>

 

 

When the data is transferred from the file system to the database, it is necessary to edit the file config.xml and remove the following line:

 

<session>{{var_dir}}/session</session>

 

 

Of course, each user is free to choose the way of session data storage which is the most convenient for them. If you have any additional questions, please contact GoMage experts directly and they will do their best to assist you.

That's where you contact us!

    By submitting this form you agree to GoMage's Terms of Use and Privacy Policy
    woo-hoo! Now its time to keep checking your inbox, as we will be getting in touch soon. Promise :)
    oops! Thanks. But it seems like some kind of technical issues stop you from meeting GOMAGE. Could you try again?