Solved

setting max_input_vars in .htaccess file

Posted on 2013-12-09
3
3,826 Views
Last Modified: 2013-12-30
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
Comment
Question by:andieje
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 19

Accepted Solution

by:
xterm earned 500 total points
ID: 39706318
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
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39706872
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
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 39709171
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question