// session_starts sets the sessionid cookie buth without the httponly var
// setting the cookie again sets the httponly cookie attribute
- sqsetcookie(session_name(),session_id(),false,$base_uri);
+
+ // disable, @see sqsetcookie and php 5.1.2
+ // sqsetcookie(session_name(),session_id(),false,$base_uri);
}
* If that happens we send the cookie header.
*/
if ($bFlush) {
- header($sCookieCache);
+ // header($sCookieCache);
return;
}
+ if (!$sName) return;
+
+ // php 5.1.2 and 4.4.2 do not allow to send multiple headers at once.
+ // Because that's the only way to get this thing working we fallback to
+ // setcookie until we solved this
+ if ($iExpire===false) $iExpire = 0;
+ setcookie($sName, $sValue, $iExpire, $sPath);
+ return;
$sHeader = "Set-Cookie: $sName=$sValue";
if ($sPath) {
}
// $sHeader .= "; Version=1";
$sCookieCache .= $sHeader ."\r\n";
- if ($bFlush) {
- header($sCookieCache);
- }
+ //header($sHeader."\r\n");
}
/**