mapleleaf Posted January 28, 2009 Share Posted January 28, 2009 I read somewhere that a max of 4kb can be stored in a session. Is this correct? I am using a database for my sessions so am not sure where the limit is coming from if indeed there is one. Maybe the 4kb is a max for a cookie?? Anyone?? Quote Link to comment https://forums.phpfreaks.com/topic/142845-solved-sessions-max-amount-of-data/ Share on other sites More sharing options...
gevans Posted January 28, 2009 Share Posted January 28, 2009 I believe that the session size limit is defined by your available memory_limit in php.ini Quote Link to comment https://forums.phpfreaks.com/topic/142845-solved-sessions-max-amount-of-data/#findComment-748812 Share on other sites More sharing options...
mapleleaf Posted January 28, 2009 Author Share Posted January 28, 2009 So we are talking 8mb. That will be more than enough information to carry around on any of my users! Any idea where the 4kb concept may have come from? Perhaps my little brain just imagined it. ??? Quote Link to comment https://forums.phpfreaks.com/topic/142845-solved-sessions-max-amount-of-data/#findComment-748819 Share on other sites More sharing options...
gevans Posted January 28, 2009 Share Posted January 28, 2009 Haha, I have no idea, doesn't ring a bell! Quote Link to comment https://forums.phpfreaks.com/topic/142845-solved-sessions-max-amount-of-data/#findComment-748822 Share on other sites More sharing options...
premiso Posted January 28, 2009 Share Posted January 28, 2009 So we are talking 8mb. That will be more than enough information to carry around on any of my users! Any idea where the 4kb concept may have come from? Perhaps my little brain just imagined it. ??? More than likely you just imagined it. Session data is stored in a file on your server. 8mb's is plenty per user and should not kill your diskspace, but let's be real. There is a slim chance you will ever break 100KB per user, unless your site is setup weird. Maybe a cookie is 4kb, but that is stored on the user's machine. Session data is stored on your server. Quote Link to comment https://forums.phpfreaks.com/topic/142845-solved-sessions-max-amount-of-data/#findComment-748825 Share on other sites More sharing options...
DarkWater Posted January 28, 2009 Share Posted January 28, 2009 So we are talking 8mb. That will be more than enough information to carry around on any of my users! Any idea where the 4kb concept may have come from? Perhaps my little brain just imagined it. ??? I'm fairly sure that cookies can only hold 4KB of data, including the name. You can also have only 20 cookies per server/domain. Quote Link to comment https://forums.phpfreaks.com/topic/142845-solved-sessions-max-amount-of-data/#findComment-748827 Share on other sites More sharing options...
mapleleaf Posted January 28, 2009 Author Share Posted January 28, 2009 Thanks all. I will assume all will be well Marking as solved to save on your time. Quote Link to comment https://forums.phpfreaks.com/topic/142845-solved-sessions-max-amount-of-data/#findComment-748841 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.