100 fields limit …
-
Dear Sir
I have problem when saving the default option for variable product in woocommerce.
I have already set all this:max_input_vars
suhosin.get.max_vars
suhosin.post.max_vars
suhosin.request.max_varsto 3000
But the plugin shows “Field limit: 100″… And I still lost the default variable combination after saving.
Any suggestion in my case please? Thank you so much.
Here is the php():
http://www.lostripthailand.com/if.php
-
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()andphpinfo()are giving different results, then I have some head-scratching ahead.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,
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.
So
suhosin.get.max_vars100 andmax_input_varsis 8192 in wp-admin> Weird. Was there already a php.in file in there that you have over-written?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…What about
.htaccess? Does that have any settings in/wp-adminthat may be setting these values?Just reading this the next morning, and after sleeping on it, I wonder if the plugin should be checking
suhosin.get.max_varsat all?suhosin.post.max_varsmakes 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.
100 is the default value of
suhosin.get.max_varsOne thing that keeps escaping me, because I tend not to use it often, is that
php.inifiles operate *only* on the directory they are in. Unlike.htaccessfiles, they are not inherited by sub-directories.This means you can set the max vars using
php.iniin your root directory, but/wp-adminwill *not* take on those values, and will fall back to the system-wide settings, which in turn may just fall back to the defaults.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,
I’ve updated the plugin to version 1.1.1. This latest version will skip the
suhosin.get.max_varsvalue 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_varsentries from your php.ini files. I’ll close it in a few days otherwise, if I don’t hear back. Thanks again.Thank you Sir!
The topic ‘100 fields limit …’ is closed to new replies.