Skip to content

Commit f0831a9

Browse files
committed
docs: update Session Preferences
1 parent ab19327 commit f0831a9

1 file changed

Lines changed: 23 additions & 20 deletions

File tree

user_guide_src/source/libraries/sessions.rst

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -387,29 +387,32 @@ Sessions are a very sensitive component of any application, so some
387387
careful configuration must be done. Please take your time to consider
388388
all of the options and their effects.
389389

390+
.. note:: Since v4.3.0, the new **app/Config/Session.php** has been added.
391+
Previously, the Session Preferences were in your **app/Config/App.php** file.
392+
390393
You'll find the following Session related preferences in your
391-
**app/Config/App.php** file:
394+
**app/Config/Session.php** file:
392395

393-
============================== ============================================ ================================================= ============================================================================================
396+
======================= ============================================ ================================================= ============================================================================================
394397
Preference Default Options Description
395-
============================== ============================================ ================================================= ============================================================================================
396-
**sessionDriver** CodeIgniter\\Session\\Handlers\\FileHandler CodeIgniter\\Session\\Handlers\\FileHandler The session storage driver to use.
397-
CodeIgniter\\Session\\Handlers\\DatabaseHandler
398-
CodeIgniter\\Session\\Handlers\\MemcachedHandler
399-
CodeIgniter\\Session\\Handlers\\RedisHandler
400-
CodeIgniter\\Session\\Handlers\\ArrayHandler
401-
**sessionCookieName** ci_session [A-Za-z\_-] characters only The name used for the session cookie.
402-
**sessionExpiration** 7200 (2 hours) Time in seconds (integer) The number of seconds you would like the session to last.
403-
If you would like a non-expiring session (until browser is closed) set the value to zero: 0
404-
**sessionSavePath** null None Specifies the storage location, depends on the driver being used.
405-
**sessionMatchIP** false true/false (boolean) Whether to validate the user's IP address when reading the session cookie.
406-
Note that some ISPs dynamically changes the IP, so if you want a non-expiring session you
407-
will likely set this to false.
408-
**sessionTimeToUpdate** 300 Time in seconds (integer) This option controls how often the session class will regenerate itself and create a new
409-
session ID. Setting it to 0 will disable session ID regeneration.
410-
**sessionRegenerateDestroy** false true/false (boolean) Whether to destroy session data associated with the old session ID when auto-regenerating
411-
the session ID. When set to false, the data will be later deleted by the garbage collector.
412-
============================== ============================================ ================================================= ============================================================================================
398+
======================= ============================================ ================================================= ============================================================================================
399+
**driver** CodeIgniter\\Session\\Handlers\\FileHandler CodeIgniter\\Session\\Handlers\\FileHandler The session storage driver to use.
400+
CodeIgniter\\Session\\Handlers\\DatabaseHandler
401+
CodeIgniter\\Session\\Handlers\\MemcachedHandler
402+
CodeIgniter\\Session\\Handlers\\RedisHandler
403+
CodeIgniter\\Session\\Handlers\\ArrayHandler
404+
**cookieName** ci_session [A-Za-z\_-] characters only The name used for the session cookie.
405+
**expiration** 7200 (2 hours) Time in seconds (integer) The number of seconds you would like the session to last.
406+
If you would like a non-expiring session (until browser is closed) set the value to zero: 0
407+
**savePath** null None Specifies the storage location, depends on the driver being used.
408+
**matchIP** false true/false (boolean) Whether to validate the user's IP address when reading the session cookie.
409+
Note that some ISPs dynamically changes the IP, so if you want a non-expiring session you
410+
will likely set this to false.
411+
**timeToUpdate** 300 Time in seconds (integer) This option controls how often the session class will regenerate itself and create a new
412+
session ID. Setting it to 0 will disable session ID regeneration.
413+
**regenerateDestroy** false true/false (boolean) Whether to destroy session data associated with the old session ID when auto-regenerating
414+
the session ID. When set to false, the data will be later deleted by the garbage collector.
415+
======================= ============================================ ================================================= ============================================================================================
413416

414417
.. note:: As a last resort, the Session library will try to fetch PHP's
415418
session related INI settings, as well as legacy CI settings such as

0 commit comments

Comments
 (0)