Reputation:
I have a PHP form (mortgage app) that is about 400 fields, traffic on the site will be low.
What is the ideal Session size for 400 fields going into a MySQL db?
In php.ini
what do I set?
Anything I should set that I am missing?
Upvotes: 17
Views: 31531
Reputation: 71
You should also check, post_max_size, max_input_vars (1000 default so you are ok)
Upvotes: 2
Reputation: 145007
There is no limit to the size of the session, BUT there is a limit to the memory PHP can take: http://ca.php.net/manual/en/ini.core.php#ini.memory-limit
Upvotes: 17
Reputation: 145007
Well, personally I have had very large sessions before with very little problems. Probably the largest size I've had before is ~10MB. It's not optimal, but I haven't had a problem with slow scripts even with that size. I wouldn't worry about sessions getting to large, but I would try to keep it under control. My theory is, if keeping it in the session makes it much faster than quering the database every time (such as in the case of a search) then I go for it.
Upvotes: 14