Re: [Fwd: [PHP] Sessions in databases]

From: Date: Fri, 09 Oct 2009 10:29:06 +0000
Subject: Re: [Fwd: [PHP] Sessions in databases]
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-298803@lists.php.net to get a copy of this message
Il pinguino volante wrote:
(There were some erroros in the previous email, I'm sorry) Hi to all. I have to realize an authentication system for a lot of users. I heard that someone uses to store session states (?) into a database. I'd like to know how and, expecially, WHY to do it and what's would be better (considering that I CANNOT -d'oh!- edit the php.ini file). Considering you cannot edit the php.ini-file i suspect you are on a shared host. Using the database for intense work in a shared environment is not always popular. I would guess that file based session-files are more scalable. And as you are using a shared hosting service you are probably not load balanced between physical different boxes and this would not gain from using the DB.
So if you have to manage a large number of user sessions i would suggest you choose a VPS or deducated/colo box and then use DB with memcached in between for fast caching. That is the way i have done it for a couple of sites i am working on.

« previous php.general (#298803) next »