SID problem
Posted: Thu Mar 24, 2005 8:02 am
I got following code
This leads to the following. If the browser opens a session first time it apparently gets a SID even though cockies are enabled. So it places $s_add behind all links. When the next page is called the url part is gone and all works fine.
This does not limit the site functionality but it does bother me.
Anyone got an idea how to avoid this?
Code: Select all
session_start();
$sess = session_id();
if (!ereg("(^([a-f0-9]{32})$)", $sess)) {
session_regenerate_id();
}
$sid_id = strip_tags(SID);
if (!empty($sid_id) ) {
$s_add = "?".$sid_id;
} else {
$s_add = "";
}This does not limit the site functionality but it does bother me.
Anyone got an idea how to avoid this?