Skip to main content

Increase max_input_vars in php.ini WHM

Comments

3 comments

  • ITGabs
    Hi, This option should be in WHM -> Service Configuration -> PHP Configuration Editor -> advanced But is not there Workarounds... You can try it adding this at the beginning of your script ini_set('max_input_vars', 9999); or in the .htaccess php_value max_input_vars 9999 or copy the main php.ini and add this line if you don't find max_input_time max_input_time = 9999 the php.ini in Cpanel is on /usr/local/lib/php.ini you can use cp /usr/local/lib/php.ini /home/[cpuser]/public_html/php.ini nano /usr/local/lib/php.ini If you use Suhosin or Fast CGI you may need additional steps for Suhosin: php_value suhosin.get.max_vars php_value suhosin.post.max_vars php_value suhosin.request.max_vars for mod fcgid cat /usr/local/cpanel/cgi-sys/php5 and check this line: [[ -f ~/public_html/php.ini ]] && exec /usr/bin/php -c ~/public_html/php.ini so the account php.ini should be only in /home/[cpuser]/public_html/php.ini There are other ways using .user.ini but I didn't see it working with Cpanel
    0
  • cPanelMichael
    Hello :) Check to make sure you are using PHP 5.3.9 or higher because the "max_input_vars" configuration value has only been available since that version of PHP. If you want to change the value for the entire server, modify /usr/local/lib/php.ini and then restart Apache. Thank you.
    0
  • MaraBlue
    [quote="cPanelMichael, post: 1498802">Hello :) Check to make sure you are using PHP 5.3.9 or higher because the "max_input_vars" configuration value has only been available since that version of PHP. If you want to change the value for the entire server, modify /usr/local/lib/php.ini and then restart Apache. Thank you.
    The line "max_input_vars = 5000" (or whatever value you want to change it to) will likely need to be added. The value is showing, but that line wasn't in my php.ini, v5.3.27. # php -i | grep max_input_vars max_input_vars => 5000 => 5000
    0

Please sign in to leave a comment.