Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

setting max_input_vars in .htaccess file

Posted on 2013-12-09
3
Medium Priority
?
4,177 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 2000 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 111

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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

618 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