Jump to content
Noyes

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!

Share this post


Link to post
Share on other sites

most hosts will not allow you to change this, especially if you are on a shared host. you should contact them and ask how to increase those values

Share this post


Link to post
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)

Share this post


Link to post
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)

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Try Hostmonster.com

 

They are pretty good about letting you set up custom php.ini limits.

Share this post


Link to post
Share on other sites

Hi, I updated the suhosin settings under my .ini file (restared apache) but still am getting the same message?

 

Please adivise

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Hi, thanks for that.

 

I tried it and this is the result: http://www.shtepiael...com/phpinfo.php

 

 

Parse error: syntax error, unexpected $end in /home/shtepi5/public_html/phpinfo.php on line 1

 

 

are you sure that you paste to phpinfo exactly the same code?

 

<?PHP

phpinfo();

?>

 

nothing more?

Share this post


Link to post
Share on other sites

This is what I have in my phpinfo.php file.

 

<?php

// Show all information, defaults to INFO_ALL
phpinfo();

// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);

?>

Share this post


Link to post
Share on other sites

The weird thing is that the input characters is set to 8000, but I still keep getting the same error in the BO when trying to modify translations.

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

you increased value both for suhising and non-suhosin?

Share this post


Link to post
Share on other sites

why did you limit max_input_vars to 1500? you appear to have 3700+ translations which means that there are 3700+ input parameters. try to update max_input_vars to 4000 also and try again.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More