What is the default lifetime of a session?

php, session

Solution

Check out php.ini the value set for session.gc_maxlifetime is the ID lifetime in seconds.

I believe the default is 1440 seconds (24 mins)

http://www.php.net/manual/en/session.configuration.php

Edit: As some comments point out, the above is not entirely accurate. A wonderful explanation of why, and how to implement session lifetimes is available here:

How do I expire a PHP session after 30 minutes?

Problem

If I hit a page which calls `session_start()`, how long would I have to wait before I get a new session ID when I refresh the page?

Original source

Related problems