The question is a wee bit ambiguous, but there are a few entries in php.ini to look at:
; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0
; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
session.gc_maxlifetime = 1440
And accompanying session_*() functions to modify them on a script-by-script and session-by-session basis.