PHP Max Input Vars – max_input_vars

Home Forums BulletProof Security Pro PHP Max Input Vars – max_input_vars

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #40745
    AITpro Admin
    Keymaster

    Email Question:

    Hello Edward I am trying to increase my PHP Max Input Vars, where is best to change this?
    They say you can do it in wp config, htaccess or php.ini. What method would be best and where do I add it in the file?

    I tried adding it in wp config to it is not working.. maybe I placed it too low or something?

    @ini_set( 'max_input_vars' , 4000 );

    I am trying to look in the htaccess file but I have no clue where to add the line:

    php_value max_input_vars 4000

    It looks so organized and I have no idea. I tried looking for it but did not see it..
    where should I place the line at?

    #40746
    AITpro Admin
    Keymaster

    Answer:

    You cannot use php_value max_input_vars 4000 in an htaccess file unless your server type allows that.  I believe you can only use that htaccess code if you have a DSO server type.  Check the BPS Pro System Info page to see if you have a CGI or DSO server type.

    You cannot use ini_set('max_input_vars', 4000); in the wp-config.php file.

    https://www.php.net/manual/en/info.configuration.php#ini.max-input-vars

    max_input_vars               1000       PHP_INI_PERDIR              Available as of PHP 5.3.9.
    PHP_INI_PERDIR              Entry can be set in php.ini, .htaccess, httpd.conf or .user.ini

    The best place to add that directive is in a .user.ini file or a php.ini file.

    Create a plain text file called .user.ini, add the directive:  max_input_vars = 4000 and upload the .user.ini file or php.ini file to your hosting account root folder.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.