Mmh il cookie viene salvato così:
Codice PHP:
my_setcookie("mybbuser", $user_info['uid']."_".$user_info['loginkey'], null, true);
La funzione my_setcookie:
Codice PHP:
function my_setcookie($name, $value="", $expires="", $httponly=false)
{
global $mybb;
if(!$mybb->settings['cookiepath'])
{
$mybb->settings['cookiepath'] = "/";
}
if($expires == -1)
{
$expires = 0;
}
elseif($expires == "" || $expires == null)
{
$expires = TIME_NOW + (60*60*24*365); // Make the cookie expire in a years time
}
else
{
$expires = TIME_NOW + intval($expires);
}
$mybb->settings['cookiepath'] = str_replace(array("\n","\r"), "", $mybb->settings['cookiepath']);
$mybb->settings['cookiedomain'] = str_replace(array("\n","\r"), "", $mybb->settings['cookiedomain']);
$mybb->settings['cookieprefix'] = str_replace(array("\n","\r", " "), "", $mybb->settings['cookieprefix']);
// Versions of PHP prior to 5.2 do not support HttpOnly cookies and IE is buggy when specifying a blank domain so set the cookie manually
$cookie = "Set-Cookie: {$mybb->settings['cookieprefix']}{$name}=".urlencode($value);
if($expires > 0)
{
$cookie .= "; expires=".@gmdate('D, d-M-Y H:i:s \\G\\M\\T', $expires);
}
if(!empty($mybb->settings['cookiepath']))
{
$cookie .= "; path={$mybb->settings['cookiepath']}";
}
if(!empty($mybb->settings['cookiedomain']))
{
$cookie .= "; domain={$mybb->settings['cookiedomain']}";
}
if($httponly == true)
{
$cookie .= "; HttpOnly";
}
$mybb->cookies[$name] = $value;
header($cookie, false);
}
Nelle impostazioni della board, c'è "Percorso dei cookie", ma settandolo a ./ Non cambia nulla.. Devo settarlo a ../ ? :S