We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Session in Mysql

Hi ! Say please, I try save sessinos in db, but https://github.com/phalcon/incubator/tree/master/Library/Phalcon/Session/Adapter#database not works

! ) Fatal error: Uncaught Error: Class 'Phalcon\Session\Adapter\Database' not found in .... where $session = new Database([

but I write use Phalcon\Db\Adapter\Pdo\Mysql; use Phalcon\Session\Adapter\Database;

Phalcon 3.0.0

And you included composer autoloader or loaded it with phalcon loader ? You just need to include autoloader composer. In phalcon 3 you can do this with $loader->registerFile.

You are not including incubator properly. Show your loader config?

In any case, storing sessions in a database is very bad in terms of performance.



14.4k

Thanks for the help! I understood that session and the database is a bad idea. Thanks !