Support

Home Forums Event Espresso Premium max_input_vars #2

max_input_vars #2

Posted: November 2, 2015 at 6:49 pm

Viewing 12 reply threads


Jos

November 2, 2015 at 6:49 pm

Hi there,

Having an issue with max_input_vars in EE4 4.8.18.p.

Please refer to this support ticket: https://eventespresso.com/topic/max_input_vars/

I did have my host change the setting to for max_input_vars 10000

And am still getting this pop up error on event page in the admin.

THE thing that is weird about this is I click away from the pop up add tickets dates time whatever and save it and they stay so this makes me think the error is not my actual max vars settings but some other error.

Once max vars is reached I’m not suppose to be able to add any more and still save.

Thanks allot I look forward to a solution.

Kind regards,

Joseph


Lorenzo Orlando Caum

  • Support Staff

November 3, 2015 at 7:08 am

Hi Joseph,

The max input vars warning is a notice that there may be too many tickets and datetimes in use. If you are on a shared hosting plan, then this will typically trigger when there are 15 — 20+ tickets along with some datetimes in use.

Did your webhost restart the server after they increased the setting?

That may be needed if the change was applied through a php.ini file.

In the long run, I would consider splitting this event up if possible across multiple events. The multiple events registration add-on will allow your attendees/registrants to register for multiple events at once.


Lorenzo


Jos

November 4, 2015 at 10:10 pm

Hi Lorenzo,

For me this happens whether I have 1 ticket or many. I usually only have 1 event date time per event and maybe two or three tickets

It started on one event where I did have several tickets.

But now occurs on all events.

I have VPS hosting so shared hosting is not an issue.

I don’t think they restarted my server but I can request that. Thanks for that tip.

Like I said it’s occuring on all new events regardless of amount of tickets.

I’ll let you know how the server restart went.

Joseph


Tony

  • Support Staff

November 5, 2015 at 1:44 am

Hi Jos,

Are you using HHVM?

If you go to Event Espresso -> Maintenance -> System information.

Search there for max_input_vars, what value shows up there?


Jos

November 5, 2015 at 7:07 am

Hi Tony,

Yes I am using HHVM.

This is what show in the Raw System Information on that page:

[max_input_vars] =>
[version] => 5.6.99-hhvm

and also under environment


Tony

  • Support Staff

November 5, 2015 at 7:11 am

Yes I am using HHVM.

That’s why your getting the notice.

We recently had this come up and found that whilst HHVM apparently supports max_input_vars and allows you to set it, it doesn’t actually do anything, or at least ini_set(‘max_input_vars’) returns nothing.

So when EE checks for max_input_vars its getting nothing. Then EE checks if the current page vars are greater than nothing…. and well they are, regardless of value so it throws the notice.

Make sense?

We have an open ticket to investigate this and I will add this thread to there.


Tony

  • Support Staff

November 5, 2015 at 7:13 am

I should also add that currently we don’t officially support HHVM, although its great people like yourself are using it 🙂

We’ve only had a single reported issue so far (this one) with HHVM but EE is not currently tested against it.


Jos

November 5, 2015 at 7:33 am

ok maybe that is the problem. What I can do is turn it off and see if that is the issue. I’ll let you know.


Jos

November 5, 2015 at 12:13 pm

OK Thanks, Tony I have forwarded your reply about HHVM to my host for their follow-up.

Any idea of a workaround to stop the message coming up in the mean time?


Jos

November 5, 2015 at 12:18 pm

Or maybe there is a way to get it to only check the page once instead over and over?


Tony

  • Support Staff

November 5, 2015 at 1:08 pm

Hi Jos,

I did some digging into the code that triggers that notice and I think I have a solution that should work.

Open up event-espresso-core-reg\core\EE_Config.core.php

On line 2436 you’ll find the function used to check this.

The first conditional is:

if ( ( $input_count >= $this->php->max_input_vars ) && ( PHP_MAJOR_VERSION >= 5 && PHP_MINOR_VERSION >= 3 && PHP_RELEASE_VERSION >=9 ) ) {

Change that to:

if ( ! empty( $this->php->max_input_vars ) && ( $input_count >= $this->php->max_input_vars ) && ( PHP_MAJOR_VERSION >= 5 && PHP_MINOR_VERSION >= 3 && PHP_RELEASE_VERSION >=9 ) ) {

Its just checking if the value pulled for max_input_vars is not empty before checking anything else, this should prevent the notice from being thrown on your server.

I’ve created a ticket for this to be added to core if it works although more investigation will likely be needed.


Jos

November 9, 2015 at 12:14 pm

Thank you very very much for that Tony!

That did the trick!

Kind regards,

Joseph


Tony

  • Support Staff

November 9, 2015 at 1:04 pm

Awesome, thanks for testing.

We’ll run this change through further testing but ourselves to confirm it doesn’t cause any issues (it shouldn’t) then it will then be included within EE core.

Viewing 12 reply threads

The support post ‘max_input_vars #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.

Event Espresso