Reply to Re: Session Info Storage: Session File or MySQL DB?

Your name:

Reply:


Posted by Matthew Weier O'Phinney on 04/08/05 21:44

* Michael <michael.acs@m5central.net>:
> I am currently developing a few security functions for my website and
> have finally decided to use the session functions that I have been
> avoiding for years since I did not want to change from what I am used to
> developing. So now that I have refreshed my brain on how to use
> sessions I have to make a decision, Where should I store my session
> data, in the session file or on my mysql database, Speed is my main
> drive here and I believe the file might be just a few microseconds
> faster, but what do you suggest I use?

Files are faster, but you really only need to worry about those
microseconds on high traffic sites or if your PHP is doing heavy
lifting. Some things to think about:

* Are you on a web cluster? If so, you'll want centralized session
storage. Your options are a database or a distributed file system
(NFS or openGFS, for instance)
* Are you using a shared host? If so, it's possible for session
collision and snooping to happen when using file based sessions.
Database storage might be a good idea in this situation.

--
Matthew Weier O'Phinney | WEBSITES:
Webmaster and IT Specialist | http://www.garden.org
National Gardening Association | http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
mailto:matthew@garden.org | http://vermontbotanical.org

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация