|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2019-10-09 00:06 UTC] jimmmaaayn at gmail dot com
Description: ------------ Setting session.cookie_samesite=None in php ini does not set attribute of session samesite to None in order for it to work on third party sites in the future. Browsers like Chrome are forcing no specified samesite to be default Lax instead of None. See https://www.chromium.org/updates/same-site Also Note down that None requires secure cookie for chrome by 2020 Test script: --------------- ini_set('session.cookie_samesite','None');session_start(); Expected result: ---------------- Session cookie should be set with the SameSite None attribute Actual result: -------------- Session cookie is not set with any Samesite Attribute PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 14:00:01 2025 UTC |
> cat t048.php <?php ini_set('session.cookie_samesite','None'); session_start(); > sapi/cgi/php-cgi t048.php X-Powered-By: PHP/7.3.16-dev Set-Cookie: PHPSESSID=e7c6bf56463ebb1eaf0dfdd0a8e2257d; path=/; SameSite=None Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate Pragma: no-cache Content-type: text/html; charset=UTF-8 Seems to work fine already? Nothing in PHP checks whether the value of cookie_samesite is actually valid, you can put whatever in it.