Failed to write magento session data

I am trying to install Magento 1.8 on my computer. I use Vagrant as a virtual machine with a Debian environment. Every time I try to install it, an error message appears:

Fatal error: Throw an Exception exception with the message Warning: Unknown: Failed to write session data (files). Verify that the current session.save_path setting is correct (/var/www/html/magento/magento_1.8/var/session ) in Unknown at line 0 'in / var / www / html / magento / magento_1.8 / application / code / core / Mage / core /functions.php: 245

And I can’t understand why! The path is correct, as well as access rights to this folder. Anyone interested? Thank you !! :)

+5
source share
2 answers

I had the same problem with a tramp, I fixed it by changing session.save_path to put it in a virtual machine.

Modify the app / etc / local.xml file

<config> <global> ... <session_save><![CDATA[files]]></session_save> <session_save_path> <![CDATA[/tmp/session]]> </session_save_path> </global> ... </config> 

Clear your cache and restart apache if you have php accelerator:

 sudo rm -R var/cache/* var/session/* sudo rm -R var/session sudo service apache2 restart 

I hope for this help.

+16
source

I also had a problem with a tramp, and I can’t tell you what is going on there.

At first, I thought it might be a memory problem, so just in case, I increased the memory to 128 MB. Does not work.

In my case, it always showed up several times, but then it suddenly worked. Until I restarted memcache.

Therefore, and then restarting it, I started to clear it through a bash script, and the problem disappeared. To inspire you, these are:

 #!/bin/bash if [ ! -f "app/etc/local.xml" ]; then echo "Not in a magento root, aborting" exit 1; fi vagrant ssh -c '(sleep 0.2; echo flush_all; sleep 0.2; echo quit; ) | telnet 127.0.0.1 11211' rm -rfv var/cache rm -rfv var/full_page_cache exit 0; 
+1
source

Source: https://habr.com/ru/post/1203720/


All Articles