Solved: Failed to Set ini Option “session.cookie_samesite” to Value “Lax” in Magento 2.3.6-p1

Solved: Failed to Set ini Option “session.cookie_samesite” to Value “Lax” in Magento 2.3.6-p1

Did you try to install Magento 2.3.6-p1?

And faced an error after installing the Magento version 2.3.6-p1 that looks something like this:

report.ERROR: Failed to set ini option “session.cookie_samesite” to value “Lax”.

If yes, relatable!

Because I’ve also faced the same error. To save you from all the process I went through to find the solution to Failed to Set ini Option “session.cookie_samesite” to Value “Lax” in Magento 2.3.6-p1, I have posted it here.

This error occurs due to the lower PHP version you may be using.

Solution for Failed to Set ini Option “session.cookie_samesite” to Value “Lax” in Magento 2.3.6-p1

PHP 7.3 or above version is a must to solve this error!

So check if your version of PHP is 7.3 or above. If not, set PHP 7.3 or above version.

However, I have another solution for this error if you don’t want to change your PHP version.

Use the below code in your SessionManager.php file located at vendor\magento\framework\Session\

However, it is not recommended to apply changes in the default file of Magento. So it is better to use PHP version 7.3 or above.

That’s all!

If you have any doubts regarding this error and its solution, 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.

Get Weekly Updates

Never miss Magento tips, tricks, tutorials, and news.

Thank you for subscribing.

Something went wrong.

5
(based on 16 Reviews)

An expert in his field, Jignesh is the team leader at Meetanshi. His passion for Magento has inspired others in the team too. Apart from work, he is a cricket lover.

Leave a reply:

Your email address will not be published.