You are here: Re: Does setting session.gc_maxlifetime affect all sessions on server? « PHP Programming Language « IT news, forums, messages
Re: Does setting session.gc_maxlifetime affect all sessions on server?

Posted by Andy Hassall on 01/17/07 18:45

On 17 Jan 2007 08:24:01 -0800, robbiesmith79@gmail.com wrote:

>Before I extend the users session timeout, with
>ini_set("session.gc_maxlifetime",86400*2); // buy the user 48 hours to
>make a decision, I wanted to know if this idea is going to affect all
>users/session on the server or just the "current user session?"

That will affect the session garbage collection run at the end of the current
request. However, it won't affect other session garbage collection runs done on
the back of requests for pages that don't have that ini_set call - this isn't
something stored within the session files.

So, if there are other sites on the same server, you'd have to also modify the
session.save_path for your sessions where you want a longer gc_maxlifetime,
else they'll just be purged by the settings that apply to the other sites and
you just end up (on average) the shortest value set. If you put the sessions
files elsewhere then they'll be isolated from this.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация