ini_set for Session maxlifetime

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
timclaason
Forum Commoner
Posts: 77
Joined: Tue Dec 16, 2003 9:06 am
Location: WI

ini_set for Session maxlifetime

Post by timclaason »

I want to increase the life of a session, so on my initial start, prior to the session_start(), I'm looking to add the following code:

Code: Select all

ini_set("session.gc_maxlifetime","14400");
My question is, if I have multiple pages that do session_start(), do I have to put that ini_set on each of those pages, or just the initial registration of the session?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Every single one.
Post Reply