FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » object in $_SESSION
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: object in $_SESSION [message #174412 is a reply to message #174411] Fri, 10 June 2011 16:34 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 6/10/2011 12:19 PM, Jivanmukta wrote:
>> I frequently store objects in sessions, and have (when taking the
>> mentioned restrictions into account) never encountered any problems.
>
> I have one more question: is there any limit for maximum size of
> object in $_SESSION. I haven't found answer in manual but I have read
> somewhere in Internet that there's no such limit (there's only limit
> for memory PHP can serve).
> I ask because if HTML bank statement contains many positions, I will
> have big $statement object.

There's no real size limit, other than memory usage. However, it's not
a good idea to store huge amounts of data in the $_SESSION; it can take
along time to serialize/write/read/deserialize it.

I put what's necessary in it. What may or may not be required I put in
a database. For instance, I will store a $user object in the $_SESSION,
but it contains minimal information (i.e. userid, privileges, etc.).
Other things I fetch as necessary.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FDF extensions to PHP will not compile
Next Topic: Setting PDO::ATTR_ERRMODE to E_WARNING before connecting!
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 14:35:49 GMT 2024

Total time taken to generate the page: 0.04071 seconds