note 129285 added to function.session-set-cookie-params

From: Date: Mon, 26 Feb 2024 20:39:35 +0000
Subject: note 129285 added to function.session-set-cookie-params
Groups: php.notes 
Request: Send a blank email to php-notes+get-221213@lists.php.net to get a copy of this message
For complete session cookie control I use this snippit <?php session_set_cookie_params( [ 'lifetime' => 0, 'path' => '/', 'domain' => $_SERVER['HTTP_HOST'], 'samesite' => 'Strict', ] ); session_start( [ 'name' => 'SESSION', 'sid_length' => 96, 'sid_bits_per_character' => 6, 'use_strict_mode' => true, 'referer_check' => $_SERVER['HTTP_HOST'], ] ); ?> This will set the params to the recommended ones and generates a cookie id of reasonable quality. ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.13.131 (proxied: 83.97.87.43) ---- Manual Page -- https://php.net/manual/en/function.session-set-cookie-params.php Edit -- https://main.php.net/note/edit/129285 Del: integrated -- https://main.php.net/note/delete/129285/integrated Del: useless -- https://main.php.net/note/delete/129285/useless Del: bad code -- https://main.php.net/note/delete/129285/bad+code Del: spam -- https://main.php.net/note/delete/129285/spam Del: non-english -- https://main.php.net/note/delete/129285/non-english Del: in docs -- https://main.php.net/note/delete/129285/in+docs Del: other reasons-- https://main.php.net/note/delete/129285 Reject -- https://main.php.net/note/reject/129285 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#221213) next »