Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
session storage in database, db driver
  • Hello! I will post my question here and if anyone can, please answer.
    I am asked to implement a database based session with fuelphp.
    I have copied the session.php config to my config folder.
    I have set in there
    'driver' => 'db' and in the db section down below I chose the right db and table.
    I created the table with oil r session:create .

    I must add that if I use 'driver' => 'cookie' everything works as expected.
    If I use db, nothing happens. I don't see either the cookie fueldid nor a row in the sessions table in my db.
    Please if you can, help
    thank you!
  • Difficult to say, there's really nothing more to it.

    You are sure oil talks to the same database as your application? Both in the same environment (so with the correct config)?
  • Yes indeed I am sure! I checked again.
  • Very odd, you have loaded the Session class? And there is interaction with the session (i.e. session variabes are set)?

    All our applications use db backed sessions, without problems, and without changing more in the config then the driver name.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion