Support

Home Forums Event Espresso Premium How to increase max_input_vars value?

How to increase max_input_vars value?

Posted: October 22, 2015 at 7:13 pm

Viewing 6 reply threads


Hoan

October 22, 2015 at 7:13 pm

Our client website is hosting on AWS + HHVM and they keep getting this message every times when they create a new event

“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.”

Here is the current /etc/hhvm/php.ini configuration.

session.save_handler = files
session.save_path = /var/lib/hhvm/sessions
session.gc_maxlifetime = 1440
hhvm.log.level = Warning
hhvm.log.always_log_unhandled_exceptions = true
hhvm.log.runtime_error_reporting_level = 8191
hhvm.mysql.typed_results = false
max_input_vars=3000
suhosin.get.max_vars=3000
suhosin.post.max_vars=3000
suhosin.request.max_vars=3000
upload_max_file_size=10M

Can you guys quickly point out what is the issue?

Thanks


Tony

  • Support Staff

October 23, 2015 at 3:40 am

Hi,

Event Espresso isn’t tested using HHVM although max_input_vars shouldn’t be an issue.

EE just reads the value using:

ini_get( 'max_input_vars' );

so whatever is returned by the server is what EE uses for that notice.

Try adding a phpinfo(); to a file within /wp-content/plugins/ and navigate to that file, what value is given for max_input_vars there?


Hoan

October 23, 2015 at 10:19 pm

Hi,

the ini_get( ‘max_input_vars’ ); return nothing so I reckon EE is using a default value to determine the max_input_vars

the link below is the phpinfo() and there is no such max_input_vars
http://52.64.115.33/

Thanks


Lorenzo Orlando Caum

  • Support Staff

October 24, 2015 at 9:04 am

Hi Hoan,

I was not able to find some definitive information on the configuration but I did locate some tutorials for using Nginx and HHVM:

http://wsnippets.com/speed-up-php-application-using-hhvm-nginx/

Did you restart HHVM after applying the change to max_input_vars?


Lorenzo


Hoan

October 24, 2015 at 9:49 am

Hi, Lorenzo thanks for the link but unfortunately it still doesn’t help the case (FYI, I did restart both hhvm and nginx). It looks like hhvm doesn’t expose max_input_vars via public API, rather than consumes it internally behind the scenes. So if EE invokes the func ini_get( 'max_input_vars' ) then there will be always empty value regardless any max_inputs_vars value in php.ini file.

Anyway, I am still very keen to know which file in the EE core that triggers the warning message, then perhaps I can hack inside and get rid of it temporarily.

Thanks


Tony

  • Support Staff

October 26, 2015 at 3:04 am

HHVM shows it supports max_input_vars within runtime configuration here:

http://docs.hhvm.com/manual/en/info.configuration.php

However I did find another mention of it returning blank here:

http://irc.cakephp.nu/hhvm/2014-05-15

The check is done within EE_Config.core.php line 2469:

public function max_input_vars_limit_check( $input_count = 0 ) {
		if ( ( $input_count >= $this->php->max_input_vars ) && ( PHP_MAJOR_VERSION >= 5 && PHP_MINOR_VERSION >= 3 && PHP_RELEASE_VERSION >=9 ) ) {
			return  __('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.', 'event_espresso');
		} else {
			return '';
		}
	}

I have created a ticket for our developers to investigate this and see if we can apply a fix to prevent the notice on HHVM.


Lorenzo Orlando Caum

  • Support Staff

November 8, 2015 at 10:16 am

Hi Hoan,

Could you let us know if this resolves the issue?

https://eventespresso.com/topic/max_input_vars-2/#post-179507


Lorenzo

Viewing 6 reply threads

The support post ‘How to increase max_input_vars value?’ 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.

Event Espresso