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

  • SEARCH
  • Home
  • 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 6171403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:12:26+00:00 2026-05-23T23:12:26+00:00

When storing the session in the database via $config[‘sess_use_database’] = TRUE; Is the size

  • 0

When storing the session in the database via

$config['sess_use_database']    = TRUE;

Is the size of the data limited to the size of the user_data field which is TEXT … ? Not 4kb like a normal cookie.

  • 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-23T23:12:26+00:00Added an answer on May 23, 2026 at 11:12 pm

    To further clarify my comment above, when you elect to save the session data in a database, CodeIgniter doesn’t set a cookie (other than the session id of course) but saves all of the information that it would have set in a cookie in your database.

    If you have a look at the sess_write in the Session class located in ./system/libraries/, if you have enabled the use of a database, you’ll see that it serializes the data using serialize and saves it directly to the database. There is no restriction on length imposed by CodeIgniter when saving to a database.

    For your convenience, here’s a link to the source code: https://bitbucket.org/ellislab/codeigniter/src/fe2247a927ab/system/libraries/Session.php#cl-252.

    The only restriction is set by the field you chose to use to save the data in your database. For more information on the data type storage requirements of MySQL, read this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking for an example of storing session data in a database, using the Zend
I've recently switched from storing session data in a cookie to storing it in
What's the best way of storing session related data of a user (like, for
Is it possible to get the size(in bytes) of a Session object after storing
I'm uploading files via JS and storing the temp path in the session. Than
i've implemented this custom PHP Session Class for storing sessions into a MySQL database:
I want to use cookies for storing userId during the session which lets to
I have the following code which connects to a oracle database via soap, creates
I am storing a lot of variables in session, which is creating a performance
I am thinking about making the switch to storing session data in encrypted cookies

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.