Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Jason Judge

    (@judgej)

    Well, that’s a real mystery – all those phpinfo() settings look right. But somehow the plugin is being told only 100 fields can be submitted, and it’s correct.

    If the plugin says the POST fields are limited to 100, and you still post, then the chances are you will loose settings as a result. It can only protect you from this problem by giving you a chance to back out of posting.

    So we know what the plugin is seeing, can you run this simple script:

    <?php
    $ini = array();
    $ini[] = ini_get('max_input_vars');
    $ini[] = ini_get('suhosin.get.max_vars');
    $ini[] = ini_get('suhosin.post.max_vars');
    $ini[] = ini_get('suhosin.request.max_vars');
    var_dump($ini);

    On of those will likely be returning 100, or something completely unexpected. Run it from the root of your site, and perhaps try running from wp-admin too, in case there are different settings in there.

    If init_get() and phpinfo() are giving different results, then I have some head-scratching ahead.

    Thread Starter anpaostudio

    (@anpaostudio)

    Hi,
    Thank you for the reply. It really helps me a lot.

    in /public_html/ I got:
    array(4) { [0]=> string(4) “3000” [1]=> string(4) “3000” [2]=> string(4) “3000” [3]=> string(4) “3000” }

    But in /wp-admin/ I got this:
    array(4) { [0]=> string(4) “8192” [1]=> string(3) “100” [2]=> string(4) “1000” [3]=> string(4) “1000” }

    It seems the problem is in /wp-admin/ . But I’m still confusing.
    What could I do to change these settings in /wp-admin/?

    Regards,

    Thread Starter anpaostudio

    (@anpaostudio)

    Well, I found a solution. But I don’t know whether it’s the best way (some suggestions please?).

    I just copied a php.ini to the /wp-admin/.

    It works and the most important thing is now I can save the default variable product option.

    In my case, your plugin save the life. I think it’s a ‘must installed’ plugin for the wordpress (especially woocomerce) user.

    Thank you.

    Plugin Author Jason Judge

    (@judgej)

    So suhosin.get.max_vars 100 and max_input_vars is 8192 in wp-admin> Weird. Was there already a php.in file in there that you have over-written?

    Thread Starter anpaostudio

    (@anpaostudio)

    Nope. It’s so weird.
    I don’t know where these value comes from. It seems like
    suhosin.get.max_vars
    suhosin.post.max_vars
    suhosin.request.max_vars

    just kept their original value before I changed them in php.ini. But I have no idea about the ‘max_input_vars = 8192’….

    Another thing I’m confusing about is when I had this problem,
    I tried asking my web host to close the Suhosin. But it didn’t help.
    I still got “Field limit: 100” in the plugin.

    Now we know the max_input_vars is 8192 in /wp-admin/
    Since my web host close the Suhosin, why wordpress and plugin still read the value of suhosin.get.max_vars and it really effected my post…

    Plugin Author Jason Judge

    (@judgej)

    What about .htaccess? Does that have any settings in /wp-admin that may be setting these values?

    Plugin Author Jason Judge

    (@judgej)

    Just reading this the next morning, and after sleeping on it, I wonder if the plugin should be checking suhosin.get.max_vars at all? suhosin.post.max_vars makes sense, but maybe not the GET var count.

    So instead of 100, the warning should have been telling you that only 1000 POST variables would be accepted. That would still be too few if you have several dozen product variations on your WooCommerce shop, but certainly not as bad as 100 POST variables.

    I’ll do a bit of research into suhosin and see if I can remove that particular check.

    Plugin Author Jason Judge

    (@judgej)

    100 is the default value of suhosin.get.max_vars

    One thing that keeps escaping me, because I tend not to use it often, is that php.ini files operate *only* on the directory they are in. Unlike .htaccess files, they are not inherited by sub-directories.

    This means you can set the max vars using php.ini in your root directory, but /wp-admin will *not* take on those values, and will fall back to the system-wide settings, which in turn may just fall back to the defaults.

    Thread Starter anpaostudio

    (@anpaostudio)

    I have checked it, there’s no .htaccess in /wp-admin/ …

    It’s true that suhosin.get.max_vars = 100 doesn’t bring any problems when saving the post with maybe 300-500 forms even the warning message popped up.
    But when the number of forms were more than 1000, something will lose after saving.

    Thank you for the analysis about php.ini. It will help more people who face the same problem as mine.

    Regrads,

    Plugin Author Jason Judge

    (@judgej)

    I’ve updated the plugin to version 1.1.1. This latest version will skip the suhosin.get.max_vars value completely, and will also only check POST forms, skipping any GET forms on the page.

    Thanks for reporting this. I don’t know why it has never been raised before, because I can imagine it would affect a few people.

    Please close the issue if this fixes the erroneous “limit 100” message for this, after taking out any suhosin.get.max_vars entries from your php.ini files. I’ll close it in a few days otherwise, if I don’t hear back. Thanks again.

    Thread Starter anpaostudio

    (@anpaostudio)

    Thank you Sir!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘100 fields limit …’ is closed to new replies.