Solved

setting max_input_vars in .htaccess file

Posted on 2013-12-09
3
3,190 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 108

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Time difference 10 35
XML Data Missing in PHP SimpleXML 8 24
mysql left join sentence 7 22
Can't connect to my database 2 14
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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 create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now