Page 1 of 1

being kicked out from session

Posted: Sat Sep 13, 2014 3:14 am
by m2babaey
Hi
I have used session to create a login script. it works fine on localhost, but when I upload it to server, if you don't have activity for a few seconds (about 5 sec), you are kicked out from session
I tried to view phpinfo to check maxlifetime, but the host manager has disabled this function although they claimed maxlifetime has the default value (i think 1440)
also they have restricted the configurations so that I cannot have my own php.ini

How do you think I can fix the problem?
Thanks in advance

Re: being kicked out from session

Posted: Sat Sep 13, 2014 11:26 am
by m2babaey
problem solved by adding

Code: Select all

 ini_set('session.gc_maxlifetime', 60*30);
before session_start()
but do you know how I can view session.gc_maxlifetime when phpinfo is disabled?

Re: being kicked out from session

Posted: Sun Sep 14, 2014 1:17 am
by requinix
ini_get

If sessions are that broken then it's a problem your host needs to fix.