@@ -525,6 +525,14 @@ into using `tmpfs <https://eddmann.com/posts/storing-php-sessions-file-caches-in
525
525
DatabaseHandler Driver
526
526
======================
527
527
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
+
528
536
The 'DatabaseHandler' driver uses a relational database such as MySQL or
529
537
PostgreSQL to store sessions. This is a popular choice among many users,
530
538
because it allows the developer easy access to the session data within
@@ -534,6 +542,9 @@ However, there are some conditions that must be met:
534
542
535
543
- You can NOT use a persistent connection.
536
544
545
+ Configure DatabaseHandler
546
+ -------------------------
547
+
537
548
In order to use the 'DatabaseHandler' session driver, you must also create this
538
549
table that we already mentioned and then set it as your
539
550
``$savePath `` value.
@@ -569,7 +580,7 @@ For PostgreSQL::
569
580
and the session ID and a delimiter. It should be increased as needed, for example,
570
581
when using long session IDs.
571
582
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
573
584
setting **. The examples below work both on MySQL and PostgreSQL::
574
585
575
586
// When sessionMatchIP = true
@@ -592,17 +603,9 @@ from the cli to generate a migration file for you::
592
603
> php spark make:migration --session
593
604
> php spark migrate
594
605
595
- This command will take the ** savePath ** and ** matchIP ** settings into account
606
+ This command will take the `` $ savePath`` and `` $ matchIP`` settings into account
596
607
when it generates the code.
597
608
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
-
606
609
.. _sessions-redishandler-driver :
607
610
608
611
RedisHandler Driver
@@ -623,6 +626,9 @@ bundled with PHP.
623
626
Chances are, you're only be using the RedisHandler driver only if you're already
624
627
both familiar with Redis and using it for other purposes.
625
628
629
+ Configure RedisHandler
630
+ ----------------------
631
+
626
632
Just as with the 'FileHandler' and 'DatabaseHandler' drivers, you must also configure
627
633
the storage location for your sessions via the
628
634
``$savePath `` setting.
@@ -632,7 +638,7 @@ link you to it:
632
638
633
639
https://github.com/phpredis/phpredis
634
640
635
- .. warning :: CodeIgniter's Session library does NOT use the actual 'redis'
641
+ .. important:: :: CodeIgniter's Session library does NOT use the actual 'redis'
636
642
``session.save_handler``. Take note **only** of the path format in
637
643
the link above.
638
644
@@ -665,6 +671,9 @@ deleted after Y seconds have passed (but not necessarily that it won't
665
671
expire earlier than that time). This happens very rarely, but should be
666
672
considered as it may result in loss of sessions.
667
673
674
+ Configure RedisHandler
675
+ ----------------------
676
+
668
677
The ``$savePath `` format is fairly straightforward here,
669
678
being just a ``host:port `` pair:
670
679
0 commit comments