50        ini_set(
"session.cookie_httponly", 1);
 
   51        if (version_compare(PHP_VERSION, 
'7.1.0', 
'>=')) {
 
   52            ini_set(
"session.sid_length", 
"32");
 
   55            ini_set(
"session.hash_bits_per_character", 
"4");
 
   59        session_name(isset($sessionName)
 
   68        if (strlen(session_id()) < 32) {
 
   69            mt_srand((
double) microtime()*1000000);
 
   70            session_id(md5(uniqid(mt_rand())));
 
   76        if (isset(
$_COOKIE[session_name()]) &&
 
   77                @strlen(
$_COOKIE[session_name()]) >= 32
 
   88            header(
"Status: 302 Found");
 
  104    ### ------------------------------------------------------- 
  115        header(
"Expires: Sat, 05 Aug 2000 22:27:00 GMT");
 
  116        header(
"Last-Modified: " . gmdate(
"D, d M Y H:i:s") . 
" GMT");
 
  117        header(
"Cache-Control: no-cache, must-revalidate");
 
  118        header(
"Pragma: no-cache");
 
  119        header(
"Cache-Control: post-check=0, pre-check=0");
 
  122    ### ------------------------------------------------------- 
  140        if ($pathInfo[0] != 
"/") {
 
  144                strrpos(getenv(
"PATH_INFO"), 
"/")+1
 
  152            getenv(
"SERVER_PORT"),
 
  155                   ? 
":" . getenv(
"SERVER_PORT")
 
  160               . (($portMatch[1] == 443) ? 
"https://" : 
"http://")
 
  161               . 
$_SERVER[
"HTTP_HOST"] . $port . $this->
url($pathInfo));
 
  165    ### ------------------------------------------------------- 
  174        $dummy = preg_match(
"/(.*)(?<!&|\?)/", $pathInfo, $match);
 
  178    ### ------------------------------------------------------- 
  185    public function url($pathInfo)
 
  187        if ($this->usesCookies || $this->transSID) {
 
  192        $dummyArray = explode(
"#", $pathInfo);
 
  193        $pathInfo = $dummyArray[0];
 
  196        $pathInfo = preg_replace(
 
  197            "/[?|&]" . session_name() . 
"=[^&]*/",
 
  203        if (preg_match(
"/&/", $pathInfo) && !preg_match(
"/\?/", $pathInfo)) {
 
  205            $pathInfo = preg_replace(
"/&/", 
"?", $pathInfo, 1);
 
  212        $pathInfo .= preg_match(
"/\?/", $pathInfo) ? 
"&" : 
"?";
 
  215        $pathInfo .= isset($dummyArray[1]) ? 
"#" . $dummyArray[1] : 
"";
 
An exception for terminatinating execution or to throw for unit testing.
"Manueller" Session-Fallback mit PHP4
url($pathInfo)
Fallback via GET - wenn Cookies ausgeschaltet sind.
__construct($sessionName="SESSID")
Konstruktor - nimmt, wenn gewuenscht einen neuen Session-Namen entgegen.
removeTrail($pathInfo)
Entfernt mögliche abschließende "&" und "?".
redirectTo($pathInfo)
HTTP-Redirect ausführen (header("Location: ...")
sendNoCacheHeader()
Cacheing unterbinden.
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']