Magento Forum

How to change session directory from (…)/magento/var/session to /var/session? {solved}
 
Andy LD
Jr. Member
 
Total Posts:  21
Joined:  2008-06-26
 

Hi!
I would like to change the location of var/session directory to another directory. I’ve changed the entry in app/etc/config.xml. Unfortunately this does not help. In app/code/core/Mage/Core/Model/App.php one can manually set the cache directory. However I can not find where I could hardcode the session directory. I read somewhere, that Magento uses memcached and that this could be the reason this setting is not “reread” from config.xml. Does anyone have an advice for me?

Regards,
Andy

 
Magento Community Magento Community
Magento Community
Magento Community
 
Andy LD
Jr. Member
 
Total Posts:  21
Joined:  2008-06-26
 

OK, I changed the line
$dir = $this->getDataSetDefault(’session_dir’, $this->getVarDir().DS.’session’);
to
$dir = ‘/var/session’
in the file app/code/core/Mage/Core/Model/Config/Options.php .
Seems that this will have done it.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top