note 107874 added to session.examples.basic
| From: | Ray dot Paseur at Gmail dot com | Date: | Mon, 12 Mar 2012 13:07:46 +0000 |
| Subject: | note 107874 added to session.examples.basic | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-186609@lists.php.net to get a copy of this message | ||
To add to the sagacious comment from anonymous at #107788, the $_SESSION array should be immutable
until after session_start() has been executed successfully. But it is not. PHP will silently allow
the script to put information into the "session" array even when the session has not been
started. This is a source of frequent confusion, such as when a programmer accidentally omits
session_start() or places session_start() inside a conditional logic structure.
----
Server IP: 192.41.42.26
Probable Submitter: 98.169.50.31
----
Manual Page -- http://www.php.net/manual/en/session.examples.basic.php
Edit -- https://master.php.net/note/edit/107874
Del: integrated -- https://master.php.net/note/delete/107874/integrated
Del: useless -- https://master.php.net/note/delete/107874/useless
Del: bad code -- https://master.php.net/note/delete/107874/bad+code
Del: spam -- https://master.php.net/note/delete/107874/spam
Del: non-english -- https://master.php.net/note/delete/107874/non-english
Del: in docs -- https://master.php.net/note/delete/107874/in+docs
Del: other reasons-- https://master.php.net/note/delete/107874
Reject -- https://master.php.net/note/reject/107874
Search -- https://master.php.net/manage/user-notes.php