8

My hosting provider is using PHP 5.2.17 and I have problems with max_input_vars that is set to 1000

I am using Prestashop and translations are not working.

I have tried to add to .htaccess:

php_value max_input_vars 6000
php_value suhosin.post.max_vars 6000
php_value suhosin.request.max_vars 6000

And after that I cannot access my page, I get I get page not found error?

Can you help me with this?

Thanks

mehnihma
  • 169
  • 2
  • 3
  • 11
  • A 404 error has nothing to do with the settings you show above. A 500 error would – Pekka Jan 13 '13 at 23:04
  • I get Page Not Found when I put that in htaccess, maybe it is just sending me to that page, not sure. But why? – mehnihma Jan 13 '13 at 23:06
  • You'll need to add more detail. What happens when you call which URL and why is max_input_vars a problem in the first place, how do you see its effect? – Pekka Jan 13 '13 at 23:07
  • When I add that to my htaccess my page stops working and just get Page not found error, nothing else. And when I remove htaccess page works after that normally. It happens on any url, I cannot access any link on my page – mehnihma Jan 13 '13 at 23:13
  • 3
    It seems you can't use `max_input_vars` with `5.2.17`. It is only available since PHP 5.3.9. Check this [link](http://php.net/manual/en/info.configuration.php) – Felipe Alameda A Jan 14 '13 at 00:45
  • there is no override for this? Then I will have to wait for hosting to upgrade to php 5.3 – mehnihma Jan 14 '13 at 18:19
  • It is also available in available since [PHP 5.3.3-7+squeeze7](http://ftp-master.metadata.debian.org/changelogs//main/p/php5/php5_5.3.3-7+squeeze17_changelog), but you have to have suhosin installed – rubo77 Oct 06 '13 at 10:22
  • `max_input_vars` truncates the request, it doesn't throw an error. Having your request truncated might lead to http error if script is expecting vars to be set. – Anthony Oct 13 '14 at 06:20

1 Answers1

11

It should work, If you add

php_value max_input_vars 6000
php_value suhosin.post.max_vars 6000
php_value suhosin.request.max_vars 6000

to your .htaccess.

be sure, the webserver can read the .htaccess file you created and there are no other typos in that file.

If you get a blank page, check the errorlog of apache for errors:

tail -f /var/log/apache2/error.log &

and if you have the rights: check the syslog too for errors when you restart apache:

tail -f /var/log/syslog &
sudo apache2ctl restart
rubo77
  • 19,527
  • 31
  • 134
  • 226