简体   繁体   中英

Magento 1.9 sessions using files on PHP 5.4

I ran into a problem this morning using file based sessions in Magento CE 1.9 under PHP 5.4. I was able to browse the site but whenever I tried to add something to cart, or login to the system it had the same effect as refreshing the page. I read a few threads on SO pointing blame at the cookie path/domain and HTTP only settings in the core_config_data table. I changed these to no effect.

As far as I can ascertain (I'm new to Magento) there is no way of specifying the session directory (even though config.xml makes it appear that you can). Instead I found that creating a symbolic link fixes the issue.

For example, to fix my session issues I used the following command;

ln -s /var/tmp /var/www/var/session

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM