this is the first time I have ever seen an error like this I have checked and double checked that nothing is sent before the SESSION is created...so I assuming that it's giving the second and third errors b/c of the firsrt error sent.

What would cause this problem creating the session. Below I have included the snippet of code I use to create the session.

Warning: session_start(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in /home/ccandpc/public_html/admin_login.php on line 3

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/ccandpc/public_html/admin_login.php:3) in /home/ccandpc/public_html/admin_login.php on line 3

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/ccandpc/public_html/admin_login.php:3) in /home/ccandpc/public_html/admin_login.php on line 3

<?
//start session if one doesn't exsist
session_start();
if (!PHPSESSID){
session_register('login');
}
else if ((!$login)){
session_register('login');
}
?>

Strange...It wAs working fine then I moved thes ite and now it's gone haywire..:-| ANyideas..

Thanks

    first thing i see: what is PHPSESSID in your script? did u really define this as a constant value?? u should better use $GET["PHPSESSID"]; (of course only if u r usin the GET method) - but to solver the start-up problem, u should check which characters r in your session id (echo it via echo $GET["PHPSESSID"] or simply read the url) - then u can see whether there r invalid chars.
    hth

      That's exactly where I messed up...I used PHPSESSID in the prior page with a form ACTION statement and declared it equal too

      $PHPSESSID before I created the session...so that's why it was telling me I had non alphnumeric characters in it.

      Thanks for your help

        Write a Reply...