note 128900 added to function.session-start
| From: | memnoch at nativecode dot net dot za | Date: | Wed, 20 Sep 2023 05:29:12 +0000 |
| Subject: | note 128900 added to function.session-start | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220860@lists.php.net to get a copy of this message | ||
General Data Protection Regulation (GDPR) in the EU and other similar laws (PECR in the UK, COPPA
and CCPA in the USA, POPIA in South Africa to name a few) require that the website user give EXPRESS
PERMISSION before cookies can be written to their device. It's why everywhere you go there are
these popups asking about cookies.
Calling session_start() BEFORE getting permission will make you in violation of these regulations,
as it will write a session cookie.
So if you have it at the top of your page (as is recommended) as the user lands on your site and
before you can even ask for permission to write cookies you will already be violating cookie laws.
Just something to keep in mind.
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.157.134 (proxied: 169.0.64.230)
----
Manual Page -- https://php.net/manual/en/function.session-start.php
Edit -- https://main.php.net/note/edit/128900
Del: integrated -- https://main.php.net/note/delete/128900/integrated
Del: useless -- https://main.php.net/note/delete/128900/useless
Del: bad code -- https://main.php.net/note/delete/128900/bad+code
Del: spam -- https://main.php.net/note/delete/128900/spam
Del: non-english -- https://main.php.net/note/delete/128900/non-english
Del: in docs -- https://main.php.net/note/delete/128900/in+docs
Del: other reasons-- https://main.php.net/note/delete/128900
Reject -- https://main.php.net/note/reject/128900
Search -- https://main.php.net/manage/user-notes.php