PDA

View Full Version : session_start


digitalbart2k
12-28-2005, 12:40 PM
In a Older post (http://www.phpdig.net/forum/showthread.php?t=1278&highlight=session) you mentioned that phpdig does not use session_start, any suggestion how to get rid of this text then on my pages that say:

Warning: session_start : The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in

I want to use sessions but is there a better way to do this?

digitalbart2k
12-29-2005, 08:36 AM
In case anyone runs into this problem, I was able to get this work by by putting the session_start in a if statement based on the useragent. I got the code from this link below and below that is the code I used.

exclude sessions (http://www.christian-web-masters.com/forums/index.php?act=Print&client=printer&f=17&t=1815)


$spiders = array("Googlebot","WebCrawler","Slurp","Fast","Scooter","Fluid","Zeal","Wget","archiver","ZyBorg ","Mantra","MSN","scrub","Teoma","Jeeves","msnbot","phpdig");


foreach($spiders as $Val)
{
if (eregi($Val, $HTTP_SERVER_VARS['HTTP_USER_AGENT']))
{
$spider_count++;
}
}
if ($spider_count == "0") {

session_start();
}


}