Today I needed to delete a session for a test customer on my Magento environment. I had no idea where sessions were stored, so I headed down to the database and looked for some
sesson-something table. I found 4 tables with that name, but non had the content I was looking for (in fact they were empty).
So I’ve made a quick Googling and found that you can use mainly three session-storage types.
They are all setup on
app/etc/local.xml with the tag
In order to use a file storage for your sessions you just have to setup the following:
Et voilà! The sessions will be stored under
Just use the following:
I got the sessions saved on the
core_session table when using this one. Its main advantage over file storage is when one uses a clustered environment.
First of all, you need a Memcache server running and have access to it. For the rest it is quite simple to use, just a little bit more verbose than the previous two:
You must adjust
localhost:portto your own configuration.
With Memcache you can manage 1000’s of sessions at one time, but its setup can be trickier, especially for peoplo who have never configured any.
So now you know how you can setup the most used session storage mechanisms in Magento.
Hope you find it useful and happy sessioning!
I’ve found this great article by Ashley Schroder which I just have summarized here: Magento Session Storage: Which to Choose and Why?