Skip to the content
Documentation

Session: old version (page id 21987756)

No ratings yet

Skip to end of metadata Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Exponential sessions are handled by the Symfony stack, through session handlers. As en example, in order to store your session data in a database, you may use the PdoSessionHandler:

framework:
    session:
        # ...
        handler_id:     session.handler.pdo

parameters:
    pdo.db_options:
        db_table:    session
        db_id_col:   session_id
        db_data_col: session_value
        db_time_col: session_time

services:
    pdo:
        class: PDO
        arguments:
            dsn:      "mysql:dbname=<mysql_database>"
            user:     <mysql_user>
            password: <mysql_password>

    session.handler.pdo:
        class:     Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler
        arguments: ["@pdo", "%pdo.db_options%"]

For more information on this and other included handlers, or information on developing your own, please check the online Symfony documentation.

To configure sessions in your Exponential 5 setup, look to the documentation of Symfony HTTP Fundation component.

  • No labels

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.