MongoDB Http Session
Requirements ¶
Yii 1.1.8 or above
Usage ¶
Install ¶
Extract the release file under protected/extensions
In config/main.php:
'session'=>array(
'class'=>'ext.EMongoDbHttpSession',
),
Options ¶
- connectionString : host:port : defalut localhost:27017
- dbName : database name : default test
- collectionName : collaction name : default yiisession
- idColumn : id column name : default id
- dataColumn : data column name : default dada
- expireColumn : expire column name : default expire
- fsync : fsync flag : default false
- safe : safe flag : default false
- timeout : timeout miliseconds : default null i.e. MongoCursor::$timeout
History ¶
2012/06/18 ver 1.3 ¶
Modify timeout to mongoTimeout
2011/08/02 ver 1.2 ¶
Modify destroySession
2011/08/01 ver 1.1 ¶
Add fsync, safe, timeout options
2011/07/05 ver 1.0 ¶
First Release
directmongosuite
I have integrated you extension in the directmongosuite
Hope this is ok for you and you will support updates there too.
Session in milisecons vs seconds.
I just starting using this extension and noticed that my session was being finished too quick, after looking at EDMSHttpSession I noticed that the timeout is considered as miliseconds. Why is that?
Shouldn't it be seconds just as it is in 'CDbHttpSession'?
Thanks
I modified timeout
Thanks for comment, yiisus
EDMSHttpSession used timeout for mongodb timeout. But timeout is one of CHttpSession property. I modified timeout to mongoTimeout.
Problem with UTF-8
Sessions are corrupted when UTF-8 encoded strings are stored with this extension.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.