[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4294
  • Last Modified:

setting max_input_vars in .htaccess file

Hi

I am trying to set a value for php max_input_vars. I am on a shared server and I do not have access to the php.ini file but I do have access to the .htaccess file. I have added this setting

php_value max_input_vars 3000

but when I call phpinfo a value of 1000 is still displayed for both local and master value

Thanks for your help
0
andieje
Asked:
andieje
1 Solution
 
xtermCommented:
First look up what the value is defined for variable user_ini.filename in your system's PHP and then create a file with that name with your php overrides in it.

Keep in mind that the administrator has to have permitted this in order for you to do so - this is not guaranteed in all shared environments.
0
 
COBOLdinosaurCommented:
In a shared environment you will find limits are imposed to prevent resource hogging that affects other users.  If the limit is imposed by the host, then you should open a ticket and see if they can give you the higher limit temporarily.  If you need it permanently, then the host will almost certainly require you to move to a higher priced hosting plan.

Cd&
0
 
Ray PaseurCommented:
Settings in .htaccess will almost always be overridden by php.ini, because it is interpreted after .htaccess, so collisions would go in the direction of the latest setting.

Run phpinfo() and look for Suhosin.  If it's there, ask your hosting company to move your account to a host that does not have Suhosin.  With Suhosin, the server will silently discard any input with more variables than Suhosin thinks you should have.  This "security feature" can play havoc with table maintenance scripts that work like a spreadsheet.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now