SigmaOne - Increasing PHP max_input_vars


SigmaOne uses many forms input in its configuration form, thus it may throw error if the PHP max_input_vars set too low.

Since PHP 5.3.9, PHP will set max_input_vars value to 1000 which means PHP will process up to 1000 form input value and convert them into $_POST value upon submit.

This will cause problem with Regionarea plugin if user has too many blocks installed and configured via the GUI, to circumvent the problem user must increase the max_input_vars value to at least 2000 via php.ini or .htaccess.

Changing the value via php.ini

This solution is only possible if you are not in a shared hosting environment or if the hosting company allows you to have per directory php.ini settings.

To change the max_input_vars you will need to append the following line to php.ini

max_input_vars = 3000

and restart apache afterwards.


Changing via .htaccess file

In order to change the value via .htaccess file, you will need to open Drupal .htaccess and add this following line :

<IfModule mod_php5.c>
  php_flag magic_quotes_gpc                 off
  php_flag magic_quotes_sybase              off
  php_flag register_globals                 off
  php_flag session.auto_start               off
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_flag mbstring.encoding_translation    off

  # Add this line
  php_value max_input_vars 2000

You don't need to restart apache if you change the line via .htaccess file.