We look at the failed to write session data hint will know that the session can not write, the solution is to set a Save_path path in the php.ini.
Error hints
Hint message: warning:failed to write session data (files).
Please verify this current setting of
Session.save_path is correct () in Unknown on line 0
Solutions
The code is as follows |
Copy Code |
Session.save_path = "D:/phprun/tmp" |
This is a custom folder to point to the error caused by default, the system does not appear, and sometimes it is possible that the directory does not have permission to write Oh, so we give permission to it.
Because of PHP's working mechanism, it does not have a daemon thread to periodically scan the session information and determine whether it is invalid, when a valid request occurs, PHP will be based on global variables session.gc_probability and SESSION.GC_ The value of divisor to determine whether a GC is enabled, by default, Session.gc_probability=1, session.gc_divisor = 100 which means there is a 1% possibility to start the GC ( This means that only one GC in 100 requests starts with one of the 100 requests.
PHP garbage collection mechanism is to scan all the session information, with the current time minus the last time the session was modified, compared with the session.gc_maxlifetime parameter, if the survival time exceeds gc_maxlifetime (default 24 minutes ), the session is deleted.
However, if your Web server has multiple sites, multiple sites, GC processing sessions can have unexpected results because the GC does not differentiate between sessions at different sites when it is working.
http://www.bkjia.com/PHPjc/633210.html www.bkjia.com true http://www.bkjia.com/PHPjc/633210.html techarticle We look at the failed to write session data hint will know that the session can not write, the solution is to set a Save_path path in the php.ini. Error message Tip: W ...