Max Input Vars causes site to error out

Operating system:
OS version:

Centos 8

I need to change my max input vars. When I add it to the HTACCESS file, the site goes down. I found this article that I was following Changed max_input_vars but no effect - Virtualmin - Virtualmin Community and during the review if I went to change the PHP to FMP from mod-php, but everytime it restarted services it would go back to mod-php.

I installed php fmp and reloaded apache and now the php config doesnt display fmp, only mod-php.

How do I get php fmp on the latest version of virtualmin and get the max input vars in place?

This does not sound right at all in so many ways.

As a first step, I would recommend that you run a Virtualmin _> System Settings → Re-check Configuration and post the output here.

The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active …

Your system has 7.38 GiB of memory, which is at or above the Virtualmin recommended minimum of 256 MiB.

BIND DNS server is installed, and the system is configured to use it.

Mail server Postfix is installed and configured.

Postfix is configured to support per-domain outgoing IP addresses.

SuExec cannot be used to run PHP scripts in CGI or FCGId modes : The Suexec command on your system is configured to only run scripts under /var/www, but the Virtualmin virtual server home directory is /home. CGI scripts run as domain owners will not be executed.

The following PHP versions are available : 7.4.19 (/bin/php74-cgi), 8.0.6 (/bin/php80-cgi)

The following PHP-FPM versions are available on this system : 7.4.19 (php-fpm) 8.0.6 (php80-php-fpm)

The following PHP execution modes are available : fpm

Webalizer is installed.

Apache is configured to host SSL websites.

MariaDB 10.3.28 is installed and running.

ProFTPD is installed.

Logrotate is installed.

SpamAssassin and Procmail are installed and configured for use.

ClamAV is installed and assumed to be running.

Plugin AWstats reporting is installed OK.

Plugin Protected web directories is installed OK.

Using network interface eth0 for virtual IPs.

IPv6 addresses are available, using interface eth0.

Default IPv4 address for virtual servers is .

Default IPv6 address for virtual servers is .

Both user and group quotas are enabled for home and email directories.

All commands needed to create and restore backups are installed.

The selected package management and update systems are installed OK.

Chroot jails are available on this system

… your system is ready for use by Virtualmin.

@calport I did just get the php to use the version 8 of php. I was able to change the max input vars to 10000, but when looking at the test php file I made, it shows that max input is 1000. I have scrubbed through a lot of ini files and have not found that value. Any recommendations?

Let me ask: when you installed Virtualmin, you used a new / fresh system with just the OS installed, as is specified in the Virtualmin documentation, right? It is important to do this. If you had stuff installed on your server before you installed Virtualmin then it might cause quirks.

Your test.php contains <?php phpinfo(); ?> I presume. The output shows that PHP 8 is being used (can you reconfirm please) and max input is 1000?

If so, add the following to .htaccess in public_html

php_value max_input_vars 10000

Then test again and let us know if test.php in public_html does not show 10000.

this was the original problem when adding that line to the htaccess file, the site goes down with an error 500.

This was a brand new build nothing existing.

Yes, what does the Apache error log say?

i made the change back to the htaccess file then rebooted the server here were the new entries (including the shutdown message

[Fri May 28 16:01:21.329668 2021] [mpm_event:notice] [pid 1222:tid 140059419883840] AH00492: caught SIGWINCH, shutting down gracefully
[Fri May 28 16:00:16.937305 2021] [suexec:notice] [pid 1338:tid 140342245894464] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri May 28 16:00:16.983134 2021] [lbmethod_heartbeat:notice] [pid 1338:tid 140342245894464] AH02282: No slotmem from mod_heartmonitor
[Fri May 28 16:00:16.989770 2021] [mpm_event:notice] [pid 1338:tid 140342245894464] AH00489: Apache/2.4.37 (centos) OpenSSL/1.1.1g mod_fcgid/2.3.9 configured – resuming normal operations
[Fri May 28 16:00:17.003896 2021] [core:notice] [pid 1338:tid 140342245894464] AH00094: Command line: ‘/usr/sbin/httpd -D FOREGROUND’

This screen

found this line (multiple times when I changed the htaccess

[Fri May 28 16:47:33.129187 2021] [core:alert] [pid 3240:tid 140341436983040] [client] /home/darkside/public_html/.htaccess: Invalid command ‘php_value’, perhaps misspelled or defined by a module not included in the server configuration

You’re trying to configure mod_php which does not (and should not) exist on your system.

php_value and php_admin_value are mod_php directives. It doesn’t make sense to use them in any system that isn’t using mod_php.

This change needs to happen in your php.ini (whichever one is active for this domain).

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.