?
avatar joo7
joo7
21 Apr 2016

Steps to reproduce the issue

joomla 3.5.1 site with many menu items
max_input_vars=1000
switch PHP5.6.19 to PHP7.0.4
save any module (eg. breadcrumbs)

Expected result

no issue

Actual result

error
php error log:
PHP Warning: Unknown: Input variables exceeded 1000.
To increase the limit change max_input_vars in php.ini

System information (as much as possible)

Additional comments

I can switch PHP7.0.4 and PHP5.6.19 back and forth,
with PHP5.6.19 and max_input_vars=1000 it works (saving any module)
with PHP7.0.4 and max_input_vars=1000 it does not...

issue is fixed after setting max_input_vars=20000
but I am wondering why PHP7.0.4 needs more max_input_vars than PHP5.6.19?
hope this helps someone somehow...

avatar joo7 joo7 - open - 21 Apr 2016
avatar brianteeman
brianteeman - comment - 21 Apr 2016

I would be very surprised if there was a difference between the two php versions. However that doesnt remove the fact that there is an issue when a site reaches the php max input vars and we dont produce a warning message. A fix to provide a notice is currently being written so I am closing this here. Thanks for reporting


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10021.

avatar brianteeman brianteeman - close - 21 Apr 2016
avatar brianteeman brianteeman - change - 21 Apr 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-04-21 08:16:24
Closed_By brianteeman
avatar brianteeman brianteeman - close - 21 Apr 2016
avatar brianteeman brianteeman - close - 21 Apr 2016
avatar brianteeman brianteeman - change - 21 Apr 2016
Title
PHP7.0.4 needs more max_input_vars than PHP5.6.19 (j3.5.1)
PHP7.0.4 needs more max_input_vars than PHP5.6.19 (j3.5.1)
avatar brianteeman brianteeman - close - 21 Apr 2016
avatar joo7
joo7 - comment - 21 Apr 2016

Thank you for your reply,

I am very surprised too, that is why I reported here.

There must be a difference between the two php versions.
If you want I could do more tests or 'messure' things
in case you think it can improove joomlas use of input vars,
but I would need instructions on how and what to do...

A notice when a site reaches the max_input_vars is a great idea

avatar joo7
joo7 - comment - 21 Apr 2016

or maybe there is an issue in php7?

avatar Bakual
Bakual - comment - 21 Apr 2016

Is the max_input_vars the same for PHP 7 and PHP 5.6 in your setting? Please check in the Joomla System Information to be sure. Just to rule out a configuration issue (different php.ini used or so).

I can't imagine PHP7 itself making a difference for that setting.

avatar joo7
joo7 - comment - 21 Apr 2016

yes, max_input_vars=1000 for both php-versions,
checked both with own phpinfo too,
switched php-versions several times, no other changes... strange... there is something not like it should...

avatar mahagr
mahagr - comment - 21 Apr 2016

Or maybe in PHP 5.6 you've just disabled logging warnings.. Try changing value of the last item and see if it saves.

Good to see the issue itself being fixed -- I would display both warning and prevent saving the data as this issue causes data loss.

avatar joo7
joo7 - comment - 21 Apr 2016

@Bakual I switch php-versions in plesk, so I think different php.ini are used. I could pm both php.ini saved in browser as .html (befor change to max_input_vars=20000), or do you require other info?

@mahagr Loggin warnings were not disabled, worked fine with php5.6. Which last item do you want me to change?

avatar Bakual
Bakual - comment - 21 Apr 2016

@joo7 My idea was mainly about that single setting. If those are same in both versions (checked in Joomla System Information, please don't rely on an own phpinfo) then I don't have another idea.

avatar brianteeman brianteeman - change - 22 Apr 2016
Labels Added: ?
avatar mahagr
mahagr - comment - 22 Apr 2016

@joo7 I meant last menu item. Easiest way to do that is to have custom assigment (include/exclude) and then select everything in all tabs and save. If doing that and reloading page doesn't display all items selected anymore you've run into the max_input_vars limit, which basically causes data loss..

And yes, been there too many times.. Usually by changing PHP version also means changed settings, so max_input_vars may actually have different value in each of the PHP versions.

avatar joo7
joo7 - comment - 24 Apr 2016

@mahagr thanks for instructions,

testing local (provider max_input_vars now is 20000, can't go back to 1000 there):
WampServer Version 3.0.4 64bit, joomla3.5.1, php7.0.5, max_input_vars 1000:
when saving a module and all menu items minus one selected (before only one single menu item is assingned) result joomla backend is:
An error has occurred.
0 Call to a member function getField() on null
Return to Control Panel

when reopening that module (now locked) still only one single menu item is assingned... no change

error.log:
PHP Warning: Unknown: Input variables exceeded 1000.
To increase the limit change max_input_vars in php.ini

same test with error_reporting = E_ALL

[24-Apr-2016 16:48:29 UTC] PHP Fatal error: Call to a member function getField() on null in C:\wamp64\www\test\administrator\components\com_modules\layouts\joomla\searchtools\default\bar.php on line 17

Add a Comment

Login with GitHub to post a comment