Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 541297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:19:44+00:00 2026-05-13T10:19:44+00:00

I’ve just moved over from my own MVC framework to a community supported one

  • 0

I’ve just moved over from my own MVC framework to a community supported one (CodeIgniter). I’m just converting my sessions over to the CodeIgniter functions and am noticing that they, by default, store the session data in an encrypted cookie. The alternative they offer are database sessions but not server-side file sessions like the native PHP library.

Now on my site, I will be building a secure backend panel so an encrypted cookie doesn’t seem like the smart option but I don’t particually want to have to connect to my database unnecessarily as it’s not very fast (shared hosting).

I’m wondering what the reasoning behind them not supporting native sessions would be and whether database sessions or server-side file sessions are generally regarded as the better option.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:19:45+00:00Added an answer on May 13, 2026 at 10:19 am

    Basically, to store the session’s data, people generally use one of three solutions :

    • files (the default)
    • database
    • memcached

    Files is the most used, as it’s the default — and it works perfectly fine in most cases — but there’s at least one situation in which it doesn’t work : when you have several servers, and your users are load-balanced on those (i.e. when 1 user is not always on the same server).

    In that kind of situation, having a central/shared place to store the sessions is necessary — and databases fit that description ; and are easy to setup, too — and PHP applications generally work with a database.

    And as databases don’t scale that well, especially for writes, you sometimes use, instead, something like memcached : a mecanism that stores data in RAM (faster), accross as many servers as you want/need (scales well).

    What solution should you use ?

    Well, in which of those situations are you ?

    • Files are OK, at least as long as one user is always on the same server
    • If you need a database for your application, you can store sessions in the database : no need for any additionnal setup (For example, Drupal does this, by default).
    • memcached needs more setup, but is probably the best solution if you have really heavy traffic…
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.