Posted Jan 09, 2015 by Brian Tajer
Ever setup a local version of a web site and it just would not work? You aren’t the only one, and you won’t be the last considering the numerous ways a site can be setup with caching and sessions, and the places where things can derail. One setup that I recently battled with delivered the following fatal error following setup:
This was a pretty simple fix once I looked at the local.xml. Session_save was set to Db instead of Files. When Session_save is set to Db on local, more than likely your storage path isn’t setup correctly and when it tries to save it doesn’t have the proper permissions to do so.
The quick fix is to just set to
<session_save><![CDATA[files]]></session_save>. By doing this you are reverting magento back to saving all sessions in the file system.
By changing db to files, I was able to load the site and proceed. Success!
This is clearly not the only issue that you can have when setting up a local Magento website. Other terrible results can include:
The first issue is probably the easiest to solve out of them all. Check your local install and make sure you have the following files setup correctly, as it’s likely they are either missing or not setup at all. (Womp womp).
The answer to the 404 page issue is more aggravating as it usually means I forgot to delete the cache or full_page_cache folders and my local just isn’t loading due to my own silliness.
Properly setting up hosts files and vhosts files usually comes down to these couple fixes: