Posted: January 3, 2015 at 5:22 am
Now that I have moved from the Decaf version I get the error message which is reproduced below. I am using PHP 5.3.2 and understand that the max_input_vars variable was not introduced until 5.3.9. Is there a way round this? “The number of inputs on this page has been exceeded. You cannot add anymore items (i.e. tickets, datetimes, custom fields) on this page because of your servers PHP “max_input_vars” setting.” |
|
I wonder whether I could be so cheeky as to call this a bug? On my version of PHP there are no limits on this (and max_input_vars is not set at all) so it makes no sense to perform the check. I seem to have got round it by changing event-espresso-core-reg/core/EE_Config.core.php to contain It may be, for other people, that max_input_vars *is* set for some versions earlier than 5.3.9 (I don’t know) or there is an equivalent limit (Suhosin patch?) in which case it may make sense to perform some check. I hope this helps but please do let me know in case this will lead anyone astray! |
|
Hi, we don’t recommend modifying the core plugin since any edits will be lost on a software update. The max input vars warning appears if there are a lot of ticket options in use for an event or a combination of many datetimes & ticket options. Its a warning to let you know that there could be issues with registration. You can raise the value through an edit in your php.ini file: https://eventespresso.com/topic/max-input-vars-warning-2/#post-122708 If this isn’t supported by your host, then they’ll be able to raise it for you from their end. Also, we recommend updating to a current version of PHP. — |
|
I am happy to make this minor change on each upgrade as it is easier than dealing with constant warnings. I think you should consider making it yourself ๐ Because max_input_vars is not set at all, the warning is coming up when $input_count is only 256 or so. I have tested my system with a simple form and it can handle 10,000 inputs so effectively there is no limit. I am not sure it is possible to set max_input_vars for PHP < 5.3.9 as that was only introduced in PHP 5.3.9. Further information is here: http://www.phpclasses.org/blog/post/171-PHP-Vulnerability-May-Halt-Millions-of-Servers.html I have contacted my hosting company about max_input_vars (because I may well be wrong) and upgrading PHP, but note that your requirements page states PHP 5.3+ Event Espresso 4 is excellent software by the way, and I am more than happy with it. |
|
Hi Jonathan, you are correct on the version of PHP that it was introduced in: http://cl.ly/image/2C2M271k0u0q We introduced this warning with the initial release of Event Espresso 4.4 last year. I’ve updated the requirements page to PHP 5.3.9 and we appreciate your kind words. — |
|
You are welcome, and the quick answers on the forum are invaluable also. I think it would make more sense to keep the requirements the same but just don’t perform the check unless the PHP version is 5.3.9+. My reasoning is that in earlier PHP versions there was NO limit and therefore a high $input_count simply wouldn’t cause a problem. It only would cause a problem in those PHP versions where max_input_vars DOES exist. (In earlier versions perhaps you should check against the relevant Suhosin patch variables, if set.) I’ll continue to use EE4, though do hope to upgrade PHP in any event. |
|
Hi Jonathan, I have created a ticket to update the check to 5.3.9, I can’t see any reason not to do this for the reasons mentioned above but the developers may know something we don’t ๐ However just to note whilst I do agree with everything you have posted, PHP 5.3.x is now end of life, it is much better to upgrade the version of PHP to either 5.3.29 (although I don’t recommended it due to being eol) or to the latest version of 5.4 (currently 5.4.36), I know you have contacted your host with a view to doing so, I just wanted to note this for future readers too. Also when updating PHP above 5.3.8 you’ll need to also increase max_input_vars to a value higher than default (1000), how much higher depends on your events, registration form, tickets, datetimes etc. With a default install of EE4 I get around 37 tickets and a single datetime with a limit of 1000. It is expected that most users will not actually hit the limit for most events (conferences or events with high ticket selections are usually the types of events that do) |
|
Just a quick update, the reason for checking for ‘5.3’ is when hosts run custom versions such 5.3.21-specialfeature This would cause issues with version_compare(), however the developers now have another method to check the version number so we are testing this currently. |
|
Hi Jonathan, I have tested the new fix, and so far it seems to be working well. As this is not a major fix and is very specific to the max_input_vars notice I will post the code change here in-case you would like to use it. Same file – event-espresso-core-reg/core/EE_Config.core.php Change this: if ( ( $input_count >= $this->php->max_input_vars ) && version_compare( $this->php->version, '5.3', '>=' ) ) { To this: if ( ( $input_count >= $this->php->max_input_vars ) && ( PHP_MAJOR_VERSION >= 5 && PHP_MINOR_VERSION >= 3 && PHP_RELEASE_VERSION >=9 ) ) { Note that this change is still in testing, but as mentioned, it’s rather specific. This will be included within the next version of Event Espresso. |
|
That’s great, thank you. |
|
Hi there, |
|
The support post ‘max_input_vars error – EE 4.4.8.p PHP 5.3.2’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.