How To Set session.gc_maxlifetime Properly

Q

How To Set session.gc_maxlifetime Properly? - PHP Script Tips - Understanding and Using Sessions

✍: FYIcenter.com

A

As you know that session.gc_maxlifetime is the session value timeout period. You should set this value based on the usage pattern of your visitors. Here are some suggestions:

# Set it to 20 minutes for a normal Web site:
session.gc_maxlifetime = 1200

# Set it to 24 hours if visitors comes to the site many time a day:
# Example: Yahoo email site expires your session in 24 hours.
session.gc_maxlifetime = 86400

2007-04-18, 6792👍, 0💬