@@ -525,6 +525,14 @@ into using `tmpfs <https://eddmann.com/posts/storing-php-sessions-file-caches-in
525525DatabaseHandler Driver
526526======================
527527
528+ .. important :: Only MySQL and PostgreSQL databases are officially
529+ supported, due to lack of advisory locking mechanisms on other
530+ platforms. Using sessions without locks can cause all sorts of
531+ problems, especially with heavy usage of AJAX, and we will not
532+ support such cases. Use ``session_write_close() `` after you've
533+ done processing session data if you're having performance
534+ issues.
535+
528536The 'DatabaseHandler' driver uses a relational database such as MySQL or
529537PostgreSQL to store sessions. This is a popular choice among many users,
530538because it allows the developer easy access to the session data within
@@ -534,6 +542,9 @@ However, there are some conditions that must be met:
534542
535543 - You can NOT use a persistent connection.
536544
545+ Configure DatabaseHandler
546+ -------------------------
547+
537548In order to use the 'DatabaseHandler' session driver, you must also create this
538549table that we already mentioned and then set it as your
539550``$savePath `` value.
@@ -569,7 +580,7 @@ For PostgreSQL::
569580 and the session ID and a delimiter. It should be increased as needed, for example,
570581 when using long session IDs.
571582
572- You will also need to add a PRIMARY KEY **depending on your 'sessionMatchIP'
583+ You will also need to add a PRIMARY KEY **depending on your $matchIP
573584setting **. The examples below work both on MySQL and PostgreSQL::
574585
575586 // When sessionMatchIP = true
@@ -592,17 +603,9 @@ from the cli to generate a migration file for you::
592603 > php spark make:migration --session
593604 > php spark migrate
594605
595- This command will take the ** savePath ** and ** matchIP ** settings into account
606+ This command will take the `` $ savePath`` and `` $ matchIP`` settings into account
596607when it generates the code.
597608
598- .. important :: Only MySQL and PostgreSQL databases are officially
599- supported, due to lack of advisory locking mechanisms on other
600- platforms. Using sessions without locks can cause all sorts of
601- problems, especially with heavy usage of AJAX, and we will not
602- support such cases. Use ``session_write_close() `` after you've
603- done processing session data if you're having performance
604- issues.
605-
606609.. _sessions-redishandler-driver :
607610
608611RedisHandler Driver
@@ -623,6 +626,9 @@ bundled with PHP.
623626Chances are, you're only be using the RedisHandler driver only if you're already
624627both familiar with Redis and using it for other purposes.
625628
629+ Configure RedisHandler
630+ ----------------------
631+
626632Just as with the 'FileHandler' and 'DatabaseHandler' drivers, you must also configure
627633the storage location for your sessions via the
628634``$savePath `` setting.
@@ -632,7 +638,7 @@ link you to it:
632638
633639 https://github.com/phpredis/phpredis
634640
635- .. warning :: CodeIgniter's Session library does NOT use the actual 'redis'
641+ .. important:: :: CodeIgniter's Session library does NOT use the actual 'redis'
636642 ``session.save_handler``. Take note **only** of the path format in
637643 the link above.
638644
@@ -665,6 +671,9 @@ deleted after Y seconds have passed (but not necessarily that it won't
665671expire earlier than that time). This happens very rarely, but should be
666672considered as it may result in loss of sessions.
667673
674+ Configure RedisHandler
675+ ----------------------
676+
668677The ``$savePath `` format is fairly straightforward here,
669678being just a ``host:port `` pair:
670679
0 commit comments