You are here: Re: make session expire « All PHP « IT news, forums, messages
Re: make session expire

Posted by NN on 11/18/07 02:37

On Sat, 17 Nov 2007 18:41:06 -0600, NN <NoName@home.com> wrote:

>a simple php login.
>it uses php/mysql and user session. the problem i'm ecountering is
>that the sessions don't expire until you log out.
>
>how can i make the sessions expire in let's say 1 hour when there is
>no activity on the webpage?
>
>thank you,
>GD

BTW i've been trying to use:
ini_set("session.gc_maxlifetime", "5");
to make the session expire in 5 secs. and i read in the page that in
fact the session should expire in 5 secs with:

echo ini_get("session.gc_maxlifetime");

but nothing happens, i reload the page in 10 secs and i'm still logged
in.

i've tried both:
session_start();
ini_set("session.gc_maxlifetime", "5");

and
ini_set("session.gc_maxlifetime", "5");
session_start();

thanks,
GD

 

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

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