session.gc_maxlifetime and session.cache_expire

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
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

session.gc_maxlifetime and session.cache_expire

Post by Ollie Saunders »

When only a single user is using a site aren't these 2 effectively the same? i.e. shortest will win.
PHP manual wrote:session.gc_maxlifetime specifies the number of seconds after which data will be seen as 'garbage' and cleaned up.
PHP manual wrote:session.cache_expire specifies time-to-live for cached session pages in minutes, this has no effect for nocache limiter.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

It makes sense.
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

Thanks for your reply, Everah.
But clearly I'm touching on an issue here which nobody has any clear knowledge.

Methinks some testing is in order.
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

Also I've just found out session names with a dot in don't work. As in the $_SESSION is always empty.
Post Reply