note 126568 added to session.configuration
| From: | polygon dot co dot in at gmail dot com | Date: | Sun, 07 Nov 2021 20:04:16 +0000 |
| Subject: | note 126568 added to session.configuration | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-217158@lists.php.net to get a copy of this message | ||
In php.ini, session.save_handler defines the name of the handler which is used for storing and
retrieving data associated with a session. [Defaults to files.]
By default session.save_handler has support for below
session.save_handler = files
session.save_handler = sqlite
session.save_handler = redis
session.save_handler = memcached
These locks the session by default for any HTTP request using session.
Locking means, a user can't access session related pages until current request is completed.
So, if you are thinking that switching to these will increase performance; the answer is NO! because
of locking behaviour.
To overcome/customise the session locking behaviour use as below.
session.save_handler = user
This is for all (including list above) modes of session storage.
For "user" type save_handler, we can ignore locks for better performance (as explained in
function session_set_save_handler). But for this we need to take care to use sessions only for
authenticity and not for passing data from one script to other.
For passing data accross scripts use GET method to achieve the goal.
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.85.242 (proxied: 103.58.153.70)
----
Manual Page -- https://php.net/manual/en/session.configuration.php
Edit -- https://main.php.net/note/edit/126568
Del: integrated -- https://main.php.net/note/delete/126568/integrated
Del: useless -- https://main.php.net/note/delete/126568/useless
Del: bad code -- https://main.php.net/note/delete/126568/bad+code
Del: spam -- https://main.php.net/note/delete/126568/spam
Del: non-english -- https://main.php.net/note/delete/126568/non-english
Del: in docs -- https://main.php.net/note/delete/126568/in+docs
Del: other reasons-- https://main.php.net/note/delete/126568
Reject -- https://main.php.net/note/reject/126568
Search -- https://main.php.net/manage/user-notes.php