Posted by:
Gemsteal
(---.12-2.cable.virginm.net)
Just leaving an update on this topic
1 - To confirm this issue does not happen on a live hosting server. All browsers allow the setting of the php session cookie, (Safari, Chrome, Edge, Opera and Firefox)
2 - To confirm In Wampserver the default php.ini results in Firefox allowing the php session cookie to be set but Chrome, Edge and Opera block its creation citing the ’same site’ and ‘secure’ issue. Interesting (to me anyway), when I change the php.ini file 'session.cookie_secure' to 1 (also True or On and remove the semicolon) and 'session.cookie_samesite = “None” Firefox sets the cookie with the right attributes but Chrome, Edge and Opera don’t, However If you look in the inspector though the php session cookie is not set it does not report that it is blocking its creation. It may be I need to alter another setting in the php.ini file to allow its creation.
3 - I tried an alternate local server program, Xampp, and this gave the same issues as Wampserver - ie Chrome, Edge , Opera would block the saving of the php session cookie citing the ‘same site’ and secure issue and though I did not test to the same extent altering the php.in file gave the same results as Wampserver. (I did have some issues when I uninstalled Xampp - it played havoc with phpmyadmin login for Wampserver and even though I tried going in to reset the password and user name in the config files I kept getting a ‘Failed to set session cookie. Maybe you are using HTTP instead of HTTPS.’ error and in the end I had to reinstall Wampserver to restore things to normal)
4 - It looks as though its just something about my machine or set up that’s causing the issue
. Though things are fine (in a way) if I test using Firefox as a browser I think the new versions of Firefox coming along may lead me to have the same problems sadly. My computer is a MacBook Pro running Big Sur with a windows partition which I use , for various reasons to write my software and test, and I am not sure if that may be the issue, though it shouldn’t be
5 - I will go over to the Mac side of the computer and hook up a local server on that side and see if it gives the same issues. I will update the topic later.