PHP Storage Session to Memcache
Because I want to cross the top-level domain, I want to save the session in Memcache,
The following settings are made:
Ini_set ("Session.save_handler", "memcache");
Ini_set ("Session.save_path", "tcp://192.168.0.77:11200");
To error: A session is active. You cannot change the session module ' s INI settings.
If you set this up again: Session.auto_start =0
You can normally save the session in Memcache.
However, at this point, every time the page is refreshed, the SessionID value changes so that it does not get the previously saved value.
Set the value of Session.auto_start to 1, the value of each refresh page SessionID will remain the same, but the value is not stored.
May I ask how to resolve this contradiction?
------Solution--------------------
Session_Start ();
To be in Ini_set ("Sessio ... After execution
You change the session settings at the script level, and Session.auto_start = 1 o'clock, PHP implicitly calls Session_Start () before the script executes.
That's not going to fit your needs, of course.
------Solution--------------------
Upstairs positive solution, can use encrypted cookies to achieve your cross-top domain name, a different idea to try.
------Solution--------------------
Reference Ucenter
------Solution--------------------
Pass the SessionID value, use the SESSION_ID function to specify the SessionID value