Jump to content

Warning, your hosting provider limits the maximum number of...


Recommended Posts

Hey guys,

 

I get this error when trying to translate a module.

 

Warning, your hosting provider limits the maximum number of fields to post in a form:

1000 for suhosin.post.max_vars

1000 for suhosin.request.max_vars

1000 for max_input_vars

 

Please ask your hosting provider to increase the suhosin post and request limit to 1867 at least. or edit the translation file manually.

 

 

I have set file permissions to 777 for the following folders:

/config, /upload, /download, /tools/smarty/compile, /img, /mails, /modules, /themes/mytheme/lang, /translations

 

I have also tried making a php.ini (not sure if the last line is correct) and put it in my root folder.:

 

suhosin.post.max_vars=2000

suhosin.request.max_vars=2000

max_input_vars=2000

 

No success so far. Anyone know how to solve this? The error above I showed you says "or edit the translation file manually.". How would I do that?

 

Thank you!

Link to comment
Share on other sites

I'm on a managed VPS. Do you know how to do this manually? What I figured out so far is to download translations/sv/ (Swedish) and in there is a few files called admin.php, errors.php, pdf.php, fields.php and inside each there are translations for the Swedish language. Lets say I want to translate the Cart Block module. How would I do that?

 

Edit: Acutally figured it out but it's not optimal. :D

 

First you need to get a translation file for example the german language and rename de.php to sv.php (sv = Swedish). I had for some reason deleted all languages except English and Swedish so I had to go to an old installation where I knew all translations could be found.

 

Then you will have a lot of german text in a file and all you gotta do now is translating each line. I used Google translater while I translated it. Some words I didn't get right and had to change them later.

 

Once done translating it I simply upload it to my the blockcart folder (root/modules/blockcart/place-file-here)

Edited by Noyes (see edit history)
Link to comment
Share on other sites

Suhosin settings go to php.ini. Check first:

 

[~]# php -v
...
with Suhosin v0.9.31, Copyright (c) 2007-2010, by SektionEins GmbH
...

 

If so, you will find the settings in (path may differ) /usr/local/lib/php.ini, e.g.

 

[suhosin]
; Filtering Options
suhosin.filter.action = ...

 

If not then add the following:

 

[suhosin]
; Required by PrestaShop translations
suhosin.request.max_vars=2000
suhosin.post.max_vars=2000
suhosin.max_input_vars=2000

 

 

Save and restart Apache

 

Note to devs. Why post thousands of translations every time, even when a single expression is changed? How does that scale to 200 modules and 50K translatable expressions?

Edited by phrasespot (see edit history)
Link to comment
Share on other sites

@phrasespot

 

because it was a terrible design and the developer had zero foresight, and probably worked on a WAMP instance where the limitations would not exist.

 

the best solution for those people that cannot increase these settings due to hosting restrictions, would be to install WAMP/LAMP on your localhost. copy your site there and perform all of your translations. then copy those translation files to your production server.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

First change your php.ini file as follows:

 

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

; max_execution_time = 30	 ; Maximum execution time of each script, in seconds
max_execution_time = 600	 ; Maximum execution time of each script, in seconds
; max_input_time = 60    ; Maximum amount of time each script may spend parsing request data
max_input_time = 600    ; Maximum amount of time each script may spend parsing request data
; memory_limit = 64M	  ; Maximum amount of memory a script may consume (16MB)
memory_limit = 256M	  ; Maximum amount of memory a script may consume (16MB)
max_input_vars = 8000;
suhosin.post.max_vars = 8000;
suhosin.request.max_vars = 8000;

 

 

Create a phpinfo.php file

http://docs.simplemachines.org/index.php?topic=479.0

 

Upload it to the public directory of your site.

 

Test it e.g. www.mysite.com/phpinfo.php

 

It should tell you whether you have successfully increased your variable settings or not.

Link to comment
Share on other sites

  • 5 months later...

I see this thread has been quiet for some time now but I am facing the exact same issue as the original poster. I get the following errors when trying to edit translations:

 

Warning, your hosting provider limits the maximum number of fields to post in a form:
4000 for suhosin.post.max_vars
4000 for suhosin.request.max_vars
1500 for max_input_vars
Please ask your hosting provider to increase the post and request limit to 3793 at least. or edit the translation file manually.

 

The php/suhosin settings have been adjusted to 4000, 4000 and 1500 respectively (this is confirmed with phpinfo) yet I still get the same errors.

 

Is there any light to be shed on this issue?

 

Thanks!

Edited by ecohosting (see edit history)
Link to comment
Share on other sites

I did not increase the max_input_variables because it did not ask me to do so. It specifically requested I increase the POST and REQUEST variable values, and based on my readings here in the forum I followed the advice and examples of others.

 

Perhaps a more specific error message would avoid the problem and frustration. Or better still some inproved programming avoiding this situation altogether would be appreciated by anyone who uses a shared hosting service. These requirements are outside what it considered acceptable php parameters.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...