By default a session is kept active while it is requested at least every 24 minutes. The configuration directive session.gc_maxlifetime sets the idle time allowed between requests to keep the session active; by default the value is set to 1440 seconds (24 minutes). To alter this value, it can be used as well the function ini_set(), which must be invoked before session_start().
So, use ini_set() passing to it the number of seconds required.