[PHP] Garbage collection and strange session behaviour

2006-06-04 Thread BNR - IT Department
Hi, Here is a simple script: ? // BEGIN OF A SCRIPT /* #1 */ ini_set('session.gc_maxlifetime', '3'); /* #2 */ ini_set('session.gc_probability',1); /* #3 */ ini_set('session.gc_divisor',1); /* #4 */ sleep(5); /* #5 */ session_start(); $sessvar = empty; if (!isset($_SESSION['a_sess_string'])) { /*

Re: [PHP] Garbage collection and strange session behaviour

2006-06-04 Thread Rasmus Lerdorf
Are you actually hitting this race condition in the real world? With a decently long maxlifetime setting I can't really see this being a realistic problem. Remember the timer is reset on every access. -Rasmus BNR - IT Department wrote: Hi, Here is a simple script: ? // BEGIN OF A SCRIPT