Revision: 3110
Author:   olavmrk
Date:     Thu May 31 01:25:14 2012
Log:      docs: Update documentation for the session stores.
http://code.google.com/p/simplesamlphp/source/detail?r=3110

Modified:
 /trunk/docs/simplesamlphp-maintenance.txt

=======================================
--- /trunk/docs/simplesamlphp-maintenance.txt   Mon Mar  8 04:41:15 2010
+++ /trunk/docs/simplesamlphp-maintenance.txt   Thu May 31 01:25:14 2012
@@ -26,18 +26,19 @@

simpleSAMLphp has an abstraction layer for session management. That means it is possible to choose between different kind of session stores, as well as write new session store plugins.

-The `session.handler` configuration option in `config.php` allows you to select which session handler SimpleSAMLphp should use to store the session information. Currently, two session handlers are included in the distribution:
-
- * `phpsession` uses the built in session management in PHP. This is the default, and is simplest to use. It will not work in a load-balanced environement. +The `store.type` configuration option in `config.php` allows you to select which method SimpleSAMLphp should use to store the session information. Currently, three session handlers are included in the distribution:
+
+ * `phpsession` uses the built in session management in PHP. This is the default, and is simplest to use. It will not work in a load-balanced environement in most configurations. * `memcache` uses the memcache software to cache sessions in memory. Sessions can be distributed and replicated among several memcache servers, enabling both load-balancing and fail-over.
-
-       'session.handler'       => 'phpsession',
+  * `sql` stores the session in an SQL database.
+
+       'store.type' => 'phpsession',

 ### Configuring memcache

-To use the memcache session handler, set the `session.handler` parameter in `config.php`:
-
-    'session.handler'       => 'memcache',
+To use the memcache session handler, set the `store.type` parameter in `config.php`:
+
+    'store.type' => 'memcache',

memcache allows you to store multiple redudant copies of sessions on different memcache servers.

@@ -99,7 +100,7 @@

 Set this value to 0 if you don't want data to expire.

-### Note
+#### Note

 The oldest data will always be deleted if the memcache server runs
 out of storage space.
@@ -123,8 +124,15 @@

Because simpleSAMLphp uses a timestamp to check which session is most recent in a fail-over setup, it is very important to run syncrhonized clocks on all webservers where you run simpleSAMLphp.

-## Load balancing and failover
-
+
+### Configuring SQL storage
+
+To store session to a SQL database, set the `store.type` option to `sql`.
+SimpleSAMLphp uses [PDO](http://www.php.net/manual/en/book.pdo.php) when accessing the database server, so the database source is configured as with a DSN. +The DSN is stored in the `store.sql.dsn` option. See the [PDO driver manual](http://www.php.net/manual/en/pdo.drivers.php) for the DSN syntax used by the different databases. +Username and password for accessing the database can be configured in the `store.sql.username` and `store.sql.password` options.
+
+The required tables are created automatically. If you are storing data from multiple separate simpleSAMLphp installations in the same database, you can use the `store.sql.prefix` option to prevent conflicts.


 ## Logging and statistics

--
You received this message because you are subscribed to the Google Groups 
"simpleSAMLphp commits" group.
To post to this group, send email to simplesamlphp-commits@googlegroups.com.
To unsubscribe from this group, send email to 
simplesamlphp-commits+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/simplesamlphp-commits?hl=en.

Reply via email to