stefangabos / Zebra_Session

A drop-in replacement for PHP's default session handler which stores session data in a MySQL database, providing better performance, better security and protection against session fixation and session hijacking
https://stefangabos.github.io/Zebra_Session/Zebra_Session/Zebra_Session.html
Other
172 stars 85 forks source link

Enhanced integration ability to beyond non-MySQLi backend. #14

Open prasad83 opened 7 years ago

prasad83 commented 7 years ago

class MyDataSessionStore implements Zebra_Session_Store { }
$session = new Zebra_Session(new MyDataSessionStore(...), 'SeCrEt');
tsmgeek commented 5 years ago

Is this going anywhere?

stefangabos commented 5 years ago

Nope, currently I don't plan on integrating this. I am not ruling it out - I will most likely look over this and implement it at some point - but that time is not now. You can fork this and merge the pull request yourself, though

alkinbg commented 1 year ago

@stefangabos is it possible to use Zebra_Session along with Zebra_Database instead of this $link and another connection to the DB. Thank you.

stefangabos commented 1 year ago

@stefangabos is it possible to use Zebra_Session along with Zebra_Database instead of this $link and another connection to the DB. Thank you.

I am not sure I understand what you are asking but Zebra Session doesn't create a new database connection - that is why the $link is passed to it (be it from Zebra Databse, PDO, or anything else). As for passing a different link than your "main" one, absolutely - you can have multiple database connections in your app and passing one of them to Zebra Session is up to you