The php prompts the Failedtowritesessiondata error solution, failedsession. Php prompts the Failedtowritesessiondata error solution. failedsession This article analyzes in detail how php prompts the Failedtowritesessiondata error solution. I will share with you how php prompts Failed to write session data error, failedsession
This article gives a detailed analysis of the solution to the php prompt "Failed to write session data" error. Share it with you for your reference. The specific method is as follows:
I. problems:
Message: Warning: Failed to write session data (files). Please verify that the current setting of session. save_path is correct () in Unknown on line 0
II. solution:
The code is as follows:
The code is as follows:
Session. save_path = "D:/phprun/tmp"
This error is caused by a custom folder pointing to an error, which is not displayed by default. it is prompted that the directory may not have the write permission, so you can grant the permission.
Due to the working mechanism of PHP, it does not have a daemon thread to regularly scan Session information and determine whether it is invalid. when a valid request occurs, PHP will use the global variable session. gc_probability and session. gc_pisor value to determine whether to enable a GC. by default, session. gc_probability = 1, session. gc_pisor = 100 that means there is a 1% possibility to start GC (that is to say, only one gc in the 100 requests will start with one of the 100 requests ).
The function of the PHP garbage collection mechanism is to scan all Session information and subtract the last modification time of the session from the current time. the gc_maxlifetime parameter is compared. if the survival time exceeds gc_maxlifetime (24 minutes by default), the session is deleted.
However, if your Web server has multiple sites and multiple sites, the GC processing session may have unexpected results, because: When GC is working, sessions of different sites are not distinguished.
I hope this article will help you with PHP programming.
Failed to write session data error solution: failedsession This article analyzes in detail the php prompt Failed to write session data error solution. Share it with you...