简体   繁体   中英

Symfony2 problems with PdoSessionHandler

I'm having some problems in my Symfony2 project to set up the parametes in config.yml to be able to use PdoSessionHandler correctly. The version of Symfony that Im using is 2.3.9

What Im trying to do is to store sessions in the database using the PdoSessionHandler.

I've followed the cookbook, but I'm having the following error in my config.yml

Is there another change or config that should be done to have effect?

Thanks...

You haven't added session.handler.pdo as a service definition (under services: ) but as a configuration-definition/root-node in your config.yml .

That's why symfony can't find an extension for loading that non-existant configuration.

This will work:

services:
    session.handler.pdo: 
        class:     Symfony\Component\HttpFoundation\Session\Storage\Handler
        # ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM