Solved: Warning: SessionHandler::read(): in Magento 2
It is not new for the Magento developer to face an error or try out a new customized feature. However, experimenting with things in a live online store may cause the functional disorder.
To avoid this risk, developers tend to move a live Magento 2 website to a local server in order to try out new themes or a plugin and solve the major issue.
Have you tried to move your Magento 2 live store into a local server and faced any error that says:
Warning: SessionHandler::read():open failed: No such file or directory
The exception looks like shown in the below image:
If yes, I got your back.
Here’s the solution to warning:SessionHandler::read(): in Magento 2 store that you can refer to:
Solution to Warning: SessionHandler::read(): in Magento 2
Replace the below code in the env.php file at app/etc
1 2 3 4 |
'session' => array ( 'save' => 'files' ), |
with the below code:
1 2 3 4 |
'session' => array ( 'save' => 'db' ), |
That’s it.
If you have any doubts regarding this error, just mention them in the Comments section below.
I would be happy to help.
Feel free to share the solution with Magento Community via social media.
Thank You.
Sanjay Jethva
Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe.
His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.
Prev
How to Programmatically Check if Customer Account is Confirmed or not in Magento 2
How to Disable Welcome Email After Creating New Customer From Admin in Magento 2
Next