Noyes Posted August 8, 2012 Share Posted August 8, 2012 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 More sharing options...
bellini13 Posted August 8, 2012 Share Posted August 8, 2012 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 Link to comment Share on other sites More sharing options...
Noyes Posted August 9, 2012 Author Share Posted August 9, 2012 (edited) 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. 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 August 9, 2012 by Noyes (see edit history) Link to comment Share on other sites More sharing options...
phrasespot Posted August 9, 2012 Share Posted August 9, 2012 (edited) 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 August 9, 2012 by phrasespot (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted August 9, 2012 Share Posted August 9, 2012 @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. 1 Link to comment Share on other sites More sharing options...
TWDesign Posted August 9, 2012 Share Posted August 9, 2012 Try Hostmonster.com They are pretty good about letting you set up custom php.ini limits. Link to comment Share on other sites More sharing options...
Noyes Posted August 9, 2012 Author Share Posted August 9, 2012 My host got it working for me, thanks. Link to comment Share on other sites More sharing options...
eplaku Posted September 22, 2012 Share Posted September 22, 2012 Hi, I updated the suhosin settings under my .ini file (restared apache) but still am getting the same message? Please adivise Link to comment Share on other sites More sharing options...
TWDesign Posted September 22, 2012 Share Posted September 22, 2012 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 More sharing options...
eplaku Posted September 22, 2012 Share Posted September 22, 2012 Hi, thanks for that. I tried it and this is the result: http://www.shtepiaelibrit.com/phpinfo.php Parse error: syntax error, unexpected $end in /home/shtepi5/public_html/phpinfo.php on line 1 Link to comment Share on other sites More sharing options...
vekia Posted September 22, 2012 Share Posted September 22, 2012 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? <?PHPphpinfo(); ?> nothing more? Link to comment Share on other sites More sharing options...
TWDesign Posted September 22, 2012 Share Posted September 22, 2012 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); ?> Link to comment Share on other sites More sharing options...
eplaku Posted September 22, 2012 Share Posted September 22, 2012 It's up now. thanks... It looks like it's fine don't know why it is not working.. Link to comment Share on other sites More sharing options...
eplaku Posted September 22, 2012 Share Posted September 22, 2012 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. Link to comment Share on other sites More sharing options...
TWDesign Posted September 22, 2012 Share Posted September 22, 2012 It's up now. thanks... What does this mean? Link to comment Share on other sites More sharing options...
ecohosting Posted March 11, 2013 Share Posted March 11, 2013 (edited) 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 March 11, 2013 by ecohosting (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted March 11, 2013 Share Posted March 11, 2013 you increased value both for suhising and non-suhosin? Link to comment Share on other sites More sharing options...
bellini13 Posted March 11, 2013 Share Posted March 11, 2013 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. Link to comment Share on other sites More sharing options...
ecohosting Posted March 11, 2013 Share Posted March 11, 2013 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 More sharing options...
bellini13 Posted March 11, 2013 Share Posted March 11, 2013 all that aside, you should increase max_input_vars to fix your issue. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now