Jump to content

[Resolved] Maximum number of inputs on a page


romank

Recommended Posts

Hi,

I have written few plugins for my clients using CubeCart. Some of them require lots and lots of inputs to be displayed on the page - the one I am currently worried about has 200 lines, with 5 inputs each (status, name, link, image, ..).

When I submit the plugin page now, it takes me back to the dashboard, and I get this error:

[04-Nov-2015 12:43:56 UTC] PHP Warning:  Invalid Security Token in /home/xxx/public_html/classes/sanitize.class.php on line 123

So I guess the POST doesnt contain the token anymore?

The max_input_vars variable is set to 100000 (yes, quite an overkill).

 

Just to clarify, the submit still takes me to this URL:

site/admin.php?_g=modules&type=plugins&module=module_name

but I see the dashboard.

Link to comment
Share on other sites

Correct.

W#e are running into this as well with the All-in-One Shipping plugin. For every shipping Zone that is created, the matrix grows by a number of key/value pairs.

But this isn't a CubeCart problem. It is a web server problem.

If running Apache, there is a default value of 1000 key/value pairs that the web server will receive (can't seem to find the name of that setting at the moment). Anything after that is truncated. There is a setting that can adjust this.

There is also a setting for PHP that affects the max number of input key/values (post_max_size, max_input_vars), and I think that default value is 1000 as well.

 

Link to comment
Share on other sites

What I have found is this, thought I doubt this is what I am looking for:

 

Apache:

  •     LimitRequestBody, around 2Gb by default, maybe greater for 64bits, check error logs for details.

PHP:

  •     post_max_size which is directly related to the POST size
  •     upload_max_filesize which may be unrelated, not sure
  •     max_input_time, if the POSt takes too long
  •     max-input-nesting-level if your data is an array with a lot of sublevels
  •     max_execution_time, but quite sure it's not that
  •     memory_limit, as you may reach a size exceding the subprocess allowed memory
  •     max_input_vars, if your data array has many elements

You may also check the suhosin.ini settings, eg.:

  • suhosin.post.max_value_length = 65000
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...