Since php stores sessions to memcache, it requires cross-top-level domain names, so I want to save the sessions to memcache, so I made the following settings: ini_set (session. save_handler, & nbsp; memcache); & nbsp; ini_set (session. save_path, & nbsp; tcp: 192.168.0.77: 112 php stores session in memcache
Because cross-top-level domain names are required, I want to save the session to memcache,
So we made the following settings:
Ini_set ("session. save_handler", "memcache ");
Ini_set ("session. save_path", "tcp: // 192.168.0.77: 11200 ");
Error: A session is active. You cannot change the session module's ini settings.
If it is set as follows: session. auto_start = 0
The session can be normally stored in memcache.
However, the sessionid value changes every time the page is refreshed, so the previously saved value cannot be obtained,
Set the value of session. auto_start to 1. the value of sessionid remains the same every time the page is refreshed, but the value is not saved.
How can this problem be solved?
------ Solution --------------------
Session_start ();
Run the following command after ini_set ("sessio...
When session. auto_start = 1, php implicitly calls session_start () before the script is executed ()
Of course, this cannot meet your needs.
------ Solution --------------------
Upstairs, can you use encrypted cookies to implement your cross-top-level domain names? try another way.
------ Solution --------------------
Refer to ucenter
------ Solution --------------------
Pass the sessionid value and use the session_id function to specify the sessionid value.