Tools, FAQ, Tutorials:
Timeout Period on Session Values in PHP
What Is the Timeout Period on Session Values in PHP?
✍: FYIcenter.com
The PHP engine has no direct settings on session timeout period. But it has a session garbage collection mechanism that you can set to remove those special files containing session values. There are 3 settings you can use to define the session garbage collection mechanism:
session.gc_probability = 1 session.gc_divisor = 1000 session.gc_maxlifetime = 1440
The first two settings tell the PHP engine to run the garbage collection process once every 1000 requests received by the Web server. The last setting tells the PHP engine to treat session values as garbage 1440 seconds after they have not been used.
Putting all settings together, your session values probably be removed 1440 seconds after the visitor stopping using your Web site. The probability of this removal is one over 1000 requests received after the 1440-second period.
In another word, if visitor John stopped using your site, and there is no other visitors coming to your site, session values created for John will never be removed. However, if you have a busy site, like 1000 requests per minute, John's session values will be removed about one minute plus 1440 seconds after John stopped using the site.
⇒ Testing the Session Garbage Collection Process in PHP
⇐ Where Are Session Values Stored in PHP
2016-10-25, 1444🔥, 0💬
Popular Posts:
Where to find tutorials on Using Azure API Management Developer Portal? Here is a list of tutorials ...
How To Convert a Character to an ASCII Value? If you want to convert characters to ASCII values, you...
How to troubleshoot the Orderer peer? The Docker container terminated by itself. You can follow this...
How to detect errors occurred in the json_decode() call? You can use the following two functions to ...
Where can I download the EPUB 2.0 sample book "The Metamorphosis" by Franz Kafka? You can following ...