I understand, how to manage user authorization using Yii built-in mechanism, but its unclear for me where is stores sessions.

I don't see any new tables in my database, but login persists, which means there is a persistent storage on a server-side to match user cookie to a userId.

Don't like anything happening without me knowing how it is done, especially when talking about security related issues. Could anyone please explain where Yii stores sessions and how to configure it.

有帮助吗?

解决方案

As i know, the session is normaly stored into files. You can set the path in the php.ini file under session.save_path.

if you want to get your save path, you can use var_dump(session_save_path());

Normaly, you can access the session data with Yii::app()->session

If you want to store sessions in the database, look at this

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top