What is the most reliable session storage in PHP: Memcache, database or files?

Posted by user1179459 on Programmers See other posts from Programmers or by user1179459
Published on 2012-11-05T05:27:45Z Indexed on 2012/11/05 11:24 UTC
Read the original article Hit count: 236

Filed under:
|

What is the best and most safest way to handle PHP sessions. Is the best way to store sessions in:

  1. Database (more reliable, but high bottleneck, slow speed, not good for high database usage websites)?

  2. Memcache (super fast, but distributed more security problems, chances of loosing data when the server restarted and chances of loosing data when the cache is full)?

  3. Files (default option, I guess slow since it reads and writes from file I/O, less security, etc).

Which method is the best? What are the problems and good things of each of those approaches?

© Programmers or respective owner

Related posts about php

Related posts about session