It's your program, you tell us. If it doesn't have a value because the client hasn't yet had it set then it should be initialised to something that makes the test guarding the redirection fail.
In other words, something so that [font=monospace]$session_life <= $inactive[/font]. Which given how those variables are defined, means [font=monospace]time() - $SESSION['timeout'] <= 100[/font]. Rearranging that gives [font=monospace]$SESSION['timeout'] >= time() - 100[/font] so that's the constraint your initial value needs to satisfy.