Welcome Guest, Not a member yet? Register   Sign In
Using session class for secure logins
#12

[eluser]BrianDHall[/eluser]
[quote author="tokyotech" date="1255774424"]Storing sessions in a database? This is outrageous. That's an additional disk access - 1,000 times slower than RAM access of a normal session variable.[/quote]

Um, no - on all counts. First of all if you are so concerned about performance you should read up on how sessions normally work in php: http://www.php.net/manual/en/session.installation.php

Quote:Note: By default, all data related to a particular session will be stored in a file in the directory specified by the session.save_path INI option. A file for each session (regardless of if any data is associated with that session) will be created. This is due to the fact that a session is opened (a file is created) but no data is even written to that file. Note that this behavior is a side-effect of the limitations of working with the file system and it is possible that a custom session handler (such as one which uses a database) does not keep track of sessions which store no data.

Unless you install shared memory functions and enable them, not storing sessions in the database is what generates additional filesystem activity.

As the PHP manual intones, not using a database to store sessions might actually be slower than the native implementation.

Also I don't see how you equate database access with filesystem accesses - MySQL uses as much memory as it does primarily to avoid disk access, and typically uses table caches in RAM to maximize performance.

Anyhow, it seems to me these aren't particular well researched or deeply held opinions - you just come off as unwilling to accept that CI requires only a few minor configuration changes to make it as secure as most people could ever want.


Messages In This Thread
Using session class for secure logins - by El Forum - 10-16-2009, 11:49 AM
Using session class for secure logins - by El Forum - 10-16-2009, 12:28 PM
Using session class for secure logins - by El Forum - 10-16-2009, 02:28 PM
Using session class for secure logins - by El Forum - 10-16-2009, 03:10 PM
Using session class for secure logins - by El Forum - 10-16-2009, 07:56 PM
Using session class for secure logins - by El Forum - 10-16-2009, 09:55 PM
Using session class for secure logins - by El Forum - 10-16-2009, 11:13 PM
Using session class for secure logins - by El Forum - 10-17-2009, 12:09 AM
Using session class for secure logins - by El Forum - 10-17-2009, 06:47 AM
Using session class for secure logins - by El Forum - 10-18-2009, 02:17 PM
Using session class for secure logins - by El Forum - 10-18-2009, 03:23 PM
Using session class for secure logins - by El Forum - 10-18-2009, 04:13 PM
Using session class for secure logins - by El Forum - 10-18-2009, 08:29 PM
Using session class for secure logins - by El Forum - 10-18-2009, 08:31 PM
Using session class for secure logins - by El Forum - 10-19-2009, 04:05 AM
Using session class for secure logins - by El Forum - 01-07-2010, 03:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB