17

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?

3 Answers 3

17

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

Sign up to request clarification or add additional context in comments.

Comments

14

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.

Comments

2

You should also check, post_max_size, max_input_vars (1000 default so you are ok)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.