1

I have a vagrant box with a Magento installation. My var folder is set to 777 (not recommended I know but I'm trying everything). When I try to login to the admin, nothing happens. I see empty session files in the var/session folder.

I have checked the following:

  • cookie domain in db (set to empty)
  • vagrant box server time equals my local time zone
  • use of localhost (I'm not using localhost, i'm using a local.XXXX.com domain)
  • cleared all my cookies
  • tried various browsers
  • tried incognito browser

I keep seeing this in the logs:

Warning: Unknown: Failed to write session data (files). Please verify
that the current setting of session.save_path is correct [path to
correct var/session folder]

but there are empty session files in that folder.

I tried deleting the session folder, and Magento creates it anew but with the empty session files.

I had the same configuration running perfectly, but I had to destroy and rebuild the vagrant box. That is when it started happening.

5

Turns out it had something to do with the version of PHP I was running (5.4.34). I downgraded to version PHP 5.3.3 (which matches our production box) and everything worked.

UPDATE

It just started happening again. I updated local.xml as follows:

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

Discovered here: https://stackoverflow.com/questions/26123081/failed-to-write-session-data-magento

  • This does not apply to Vagrant only, but also to VMWare Shared Folders. Session serialization failed silently for me. Thanks! – paul.ago Sep 28 '18 at 12:21
  • That's funny, I use VMWare too so maybe it's just a VMWare issue? – Laura Sep 28 '18 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.