hi!
i'm trying to keep track of online users connected to my site. i'm using the session data files to determine how many sessions are started a thus calculate the amount of users online.. ok
first i have to set an alternative path for the session files before i start the session.
session_save_path("spool/");
session_start();
if you access the page it works fine, even when you hit reload a couple of times. as soon as you change the URI , for example:
www.yourhost.com?id=36 instead of www.yourhost.com and you hit reload 2 times, new session files are created with different session id's in the filenames.
http://bugs.php.net/bug.php?id=16263 seems to be on the same problem..
and! what is realy strange is: if you add the following code before session_start:
session_name(session_id());
it generates an new id with every refresh, thus always screws up 🙂. i don't know if this is ok? because, as far as i understand it, session_id(); only gets or sets the id, so if it's blank why would it set a new one?
because i really don't know where to look for the problem maybe a phpinfo(); of the virtual account would be usefull
phpinfo();
if i left out any information that would be usefull to solve this weird problem please say so, and i will try to provide it
thanks in advance,
kees