Solved

setting max_input_vars in .htaccess file

Posted on 2013-12-09
3
3,452 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
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 109

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
This article discusses how to create an extensible mechanism for linked drop downs.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

803 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