2017 © Pedro Peláez
 

symfony-bundle redis-session-handler-bundle

Symfony2 Redis Session Handler Bundle

image

tyrola/redis-session-handler-bundle

Symfony2 Redis Session Handler Bundle

  • Monday, November 7, 2016
  • by BirknerAlex
  • Repository
  • 1 Watchers
  • 1 Stars
  • 9,346 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 5 % Grown

The README.md

Getting Started With RedisSessionHandlerBundle

Prerequisites

  • Symfony 2.1 or newer
  • PHP 5.4 or newer
  • PHP PhpRedis extension

Installation

Installation is a quick 3 steps process:, (*1)

  1. Install RedisSessionHandlerBundle
  2. Enable the bundle
  3. Update your config

Step 1: Install RedisSessionHandlerBundle

The preferred way to install this bundle is to rely on Composer. Just check on Packagist the version you want to install (in the following example, we used "dev-master") and add it to your composer.json:, (*2)

``` js { "require": { // ... "tyrola/redis-session-handler-bundle": "1.1" } }, (*3)


### Step 2: Enable the bundle Open up the AppKernel.php file and add the bundle to the kernel: ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new BirknerAlex\RedisSessionHandlerBundle\RedisSessionHandlerBundle(), ); }

Step 3: Update your config

Open the app/config/config.yml File and add these following lines:, (*4)

# app/config/config.yml

framework:
    session:
        handler_id:  redis.session.handler

redis_session_handler:
    class: BirknerAlex\RedisSessionHandlerBundle\Session\Storage\Handler\RedisSessionHandler
    host: "127.0.0.1" # Your redis hostname
    port: 6379 # Your redis port
    database: 0 # Your redis database id (Default is 0)
    db_options: ~

You're done!, (*5)

Optional: More configuration

# app/config/config.yml
redis_session_handler:
    password: "MySecretPassword" # Provide a password if requirepass is enabled
    db_options:
        expiretime: 1800 # Session lifetime in seconds
        prefix: "session_" # Custom prefix for sessions

The Versions

07/11 2016

dev-master

9999999-dev https://tyrola.at

Symfony2 Redis Session Handler Bundle

  Sources   Download

The Requires

 

redis symfony2 session

24/02 2016

1.1

1.1.0.0 https://tyrola.at

Symfony2 Redis Session Handler Bundle

  Sources   Download

The Requires

 

redis symfony2 session

15/01 2015

1.0

1.0.0.0 https://tyrola.at

Symfony2 Redis Session Handler Bundle

  Sources   Download

The Requires

 

The Development Requires

redis symfony2 session