Forum Moderators: coopster

Message Too Old, No Replies

set cookies and session id

         

blucrystal

3:00 pm on Mar 23, 2004 (gmt 0)



Hi all, i'm new here :-)
I have a big problem with a login page using cookies.
The most of registered members can access and login, instead someone else, with the same pc configuration and browser can't access!

Why?
I debugged the page when the member was online and i noticed the following:
- i verified the SID and it miss
- he can't create the session id and the cookie...

Of course i ask the members to check their cookies config but it's the same!

Into the login page i wrote this code to create teh cookie:

setcookie("pippo", $datichemiservono, time()+72000);
header("Location: fc_news.php");

then the page does a redirect on the autentication page. In $datichemiservono i got all needed info which have to be written into the cookie.

Into the autentication page, as far as some members couldn't login, i tried to wrote some executive code with the same result at the end-

This is the code:

if (isset ($HTTP_COOKIE_VARS) )
{
while (list ($nome, $valore) = each ( $HTTP_COOKIE_VARS ) )
{
$arryvalore = explode("#", $valore);
$session_nome = $arryvalore[0];
$session_cognome = $arryvalore[1];
if ($session_cognome!= "") {

$session_mail = $arryvalore[2];
$session_username = $arryvalore[3];
$session_id = $arryvalore[4];
$session_tessera = $arryvalore[5];
$session_lingua = $arryvalore[6];

}
//echo "$valore<br>U: $session_nome<br>------------------";
break;
}
}

if ($pippo)
{
//echo "Ciao: $pippo";
$arryKylieFC = explode("#", $pippo);

$session_cognome = $arryKylieFC[1];
$session_mail = $arryKylieFC[2];
$session_username = $arryKylieFC[3];
$session_id = $arryKylieFC[4];
$session_tessera = $arryKylieFC[5];
$session_lingua = $arryKylieFC[6];
}

as u can see there's 2 ECHO debug annoted but if activate them i can see both, instead some of the other members can't see any of them!
Now i can't see what else i can do

Please Help. :-(

coopster

1:53 pm on Mar 25, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, blucrystal!

Have you tried setting the domain for the cookie as well? See msg #3 in this thread [webmasterworld.com] for explanation.