Navigation
eZ Documentation Center
 

This is outdated documentation made for eZ Publish Platform 5.1. It is being moved into the eZ Publish 5.x documentation, so please go there for most up-to-date documentation.

Skip to end of metadata
Go to start of metadata

eZ Publish 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 eZ Publish 5 setup, look to the documentation of Symfony HTTP Fundation component.

  • No labels