Jump to content

PHP configuration limits the maximum number


Recommended Posts

Hi I have 1.5 installed but when i go to >localisations>translations to change the 'Our Stores' title on the front page - I get this error

 

"Warning, your PHP configuration limits the maximum number of fields to post in a form: 1000 for max_input_vars.

Please ask your hosting provider to increase the this limit to 1316 at least or edit the translation file manually."

 

i have max_input_vars up to 4500 (see screenshot) why am i still getting this error?

 

post-14862-0-46487400-1349217033_thumb.jpg

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...
  • 1 month later...

Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@ and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

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

(remove php_flag max_input_vars 5000 from .htaccess in root directory of your prestashop)

 

 

create separate .htaccess file for /admin/ folder

this file should contains only

 

php_flag max_input_vars 5000

  • Like 1
Link to comment
Share on other sites

(remove php_flag max_input_vars 5000 from .htaccess in root directory of your prestashop)

 

 

create separate .htaccess file for /admin/ folder

this file should contains only

 

php_flag max_input_vars 5000

 

look now i have one .htaccess under the main dir of the shop and one under the admin dir

as i checked both contains the same content

 

you say /admin/folder, what do you mean by that?

do you suggest deleting current .htaccess under my admin folder and create a new with only the php_flag max_input_vars 5000 in it?

Link to comment
Share on other sites

It's really weird that you've got separate file in /admin/ directory.

Back up this file and create new with

 

php_flag max_input_vars 5000

 

but remember, your hosting provider may block the ability to change this parameter values and if so - it will not work.

 

then restore all .htaccess files

  • Like 1
Link to comment
Share on other sites

It's really weird that you've got separate file in /admin/ directory.

Back up this file and create new with

 

php_flag max_input_vars 5000

 

but remember, your hosting provider may block the ability to change this parameter values and if so - it will not work.

 

then restore all .htaccess files

 

did that and didnt work... i got 500 error..

Link to comment
Share on other sites

Limits of 1000 is quite common these days, wouldn't it be a good idea to sort of "solve" this? Dividing the translations up in a few sections or whatever? I moved to a new host more or less because of this, it would have worked pretty fine otherwise, but I am the kind of guy who's quite drastic so I moved on. For others, this might not be an option when they launch their shop (simply can't afford it), and to always, always "find a way around things" (i.e. edit on a local WAMP-server installation, and upload through FTP) is quite frustrating in the extent.

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

i have finally fixed this limit!!

i did this by adding in the "php.ini" file which is located in "/usr/local/lib" under the root account of the linux server and added these lines:

max_input_vars = 3000
suhosin.post.max_vars = 3000
suhosin.request.max_vars = 3000

 

note* that some of you may already have those lines in "php.ini" file and you only have to change those numbers.

 

credits to this post: http://anothersysadm...-and-big-forms/

  • Like 2
Link to comment
Share on other sites

sorry, my english is so wrong:

the correct answer in .htaccess write:

 

php_value max_input_vars 5000

 

save and refresh

php_flag max_input_vars 5000 is wrong

php_flag is for example:

php_flag magic_quotes_gpc On

only words and php_values only numbers.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

It's really weird that you've got separate file in /admin/ directory.

Back up this file and create new with

 

php_flag max_input_vars 5000

 

but remember, your hosting provider may block the ability to change this parameter values and if so - it will not work.

 

then restore all .htaccess files

 

 

 

It work for me 1.5.4 thanks!

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hello, it worked for me by editing the php.ini, adding these 3 lines mentioned above with limit up to 5000. Saved, refreshed my translation page on the BO and page came up successfully. BTW, thanks goes to vekia for his reply in the translations related thread.

  • Like 1
Link to comment
Share on other sites

Hello, it worked for me by editing the php.ini, adding these 3 lines mentioned above with limit up to 5000. Saved, refreshed my translation page on the BO and page came up successfully. BTW, thanks goes to vekia for his reply in the translations related thread.

 

nice to hear that i could help, regards

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Hi everybody!

 

I also had a problem with this.

 

I have tried to put php_value max_input_vars 4000 in .htaccess whitch I found in the folder where all prestoshop files are installed, but that did not solve the issue apparently because I am using PHP 5.4.

 

In my case i had to create a file .user.ini in my public_html directory (because there was no such file) and put the following line in the file max_input_vars = 3500

 

So if you are using PHP 5.2 you shoud try to put php_value max_input_vars 4000 in .htaccess in the directory where prestashop files are installed;

and if you are using PHP 5.3 or PHP 5.4 you should try to put max_input_vars = 3500 in .user.ini in the public_html directory.

 

Hope this helps B)

Edited by Ixus (see edit history)
  • Like 5
Link to comment
Share on other sites

  • 3 weeks later...

this is my htaccess file, where should i put this (php_value max_input_vars 5000) code?

 

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution

# http://www.prestashop.com - http://www.prestashop.com/forums

<IfModule mod_rewrite.c>

RewriteEngine on

RewriteCond %{HTTP_HOST} ^eroticfashion.ge$

RewriteRule . - [E=REWRITEBASE:/]

RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# Images

RewriteCond %{HTTP_HOST} ^eroticfashion.ge$

RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]

RewriteCond %{HTTP_HOST} ^eroticfashion.ge$

RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]

RewriteCond %{HTTP_HOST} ^eroticfashion.ge$

RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]

RewriteCond %{HTTP_HOST} ^eroticfashion.ge$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]

RewriteCond %{HTTP_HOST} ^eroticfashion.ge$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]

RewriteCond %{HTTP_HOST} ^eroticfashion.ge$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]

RewriteCond %{HTTP_HOST} ^eroticfashion.ge$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]

RewriteCond %{HTTP_HOST} ^eroticfashion.ge$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]

RewriteCond %{HTTP_HOST} ^eroticfashion.ge$

RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]

RewriteCond %{HTTP_HOST} ^eroticfashion.ge$

RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]

# AlphaImageLoader for IE and fancybox

RewriteCond %{HTTP_HOST} ^eroticfashion.ge$

RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]

# Dispatcher

RewriteCond %{REQUEST_FILENAME} -s [OR]

RewriteCond %{REQUEST_FILENAME} -l [OR]

RewriteCond %{REQUEST_FILENAME} -d

RewriteCond %{HTTP_HOST} ^eroticfashion.ge$

RewriteRule ^.*$ - [NC,L]

RewriteCond %{HTTP_HOST} ^eroticfashion.ge$

RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]

</IfModule>

 

#If rewrite mod isn't enabled

ErrorDocument 404 /index.php?controller=404

# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

 

Try to put the code above

# ~~start~~ .......

 

And it should work if you are running php 5.2.

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

i have the same problem.

 

My PS version 1.5.3.1

PHP Version 5.3.24

PHP Version 5.3.24
System Linux p3nlhg958.shr.prod.phx3.secureserver.net 2.6.32-358.11.1.el6.nfsfixes.cve20132224.x86_64 #1 SMP Tue Jul 2 20:22:31 MST 2013 x86_64 Build Date May 1 2013 11:11:23

 

I'm using Godaddy Shared Hosting "Ultimate" plan

 

I've tried to use localization > Translations
But unfortunately its given warning message.

Warning, your PHP configuration limits the maximum number of fields to post in a form: 1000 for max_input_vars.
Please ask your hosting provider to increase the this limit to 1423 at least or edit the translation file manually.


I have tried to do above solutions.

i have put

max_input_vars = 4000
suhosin.post.max_vars = 4000
suhosin.request.max_vars = 4000

 

to php.ini file

But did not worked.

 

Then i've put

 

php_value max_input_vars 4000

 

to .htaccess file

 

Then server given Error 500

 

Friends. I need your help to resolve this.

Link to comment
Share on other sites

i have the same problem.

 

My PS version 1.5.3.1

PHP Version 5.3.24

PHP Version 5.3.24

System Linux p3nlhg958.shr.prod.phx3.secureserver.net 2.6.32-358.11.1.el6.nfsfixes.cve20132224.x86_64 #1 SMP Tue Jul 2 20:22:31 MST 2013 x86_64 Build Date May 1 2013 11:11:23

 

I'm using Godaddy Shared Hosting "Ultimate" plan

 

I've tried to use localization > Translations

But unfortunately its given warning message.

 

Warning, your PHP configuration limits the maximum number of fields to post in a form: 1000 for max_input_vars.

Please ask your hosting provider to increase the this limit to 1423 at least or edit the translation file manually.

 

I have tried to do above solutions.

i have put

max_input_vars = 4000

suhosin.post.max_vars = 4000

suhosin.request.max_vars = 4000

 

to php.ini file

But did not worked.

 

Then i've put

 

php_value max_input_vars 4000

 

to .htaccess file

 

Then server given Error 500

 

Friends. I need your help to resolve this.

 

 

GoDaddy might now allow you to change the php.ini limits. You may have access to the file but you should contact them in order to get this sorted out. Have you contacted them?

Link to comment
Share on other sites

as far as i remember, on godaddy host you have to create php5.ini file with this code:

 

I remember that as well, which is strange because it seems white lion already had access to a php file. That's why I asked him to contact GoDaddy to get an official recommendation. Thanks for your input vekia, maybe this solution will work for white lion. 

Link to comment
Share on other sites

Dear Benjamin

Thank your for your reply.

 

(Posted 12 September 2013 - 09:56 PM) Yes. you are correct. they do not allow to edit php.ini file.

 

I've contact GoDaddy then they said change it to php5.ini

 

I have followed this max_input_vars 1000 [sOLVED] (http://www.prestashop.com/forums/topic/235573-max-input-vars-1000-solved/) and change it as php5.ini

 

then i its solved and i made changes.

Link to comment
Share on other sites

I am in contact with Bluehost, and the personal have tried everything, they have put php.ini file in my root, and in the folder that contains prestashop, and in the folder that contains psadmin, 

 

The file contains the max_input_vars=4000

 

 

Still I get the same error! 

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

  • 3 months later...

Hi everybody!

 

I also had a problem with this.

 

I have tried to put php_value max_input_vars 4000 in .htaccess whitch I found in the folder where all prestoshop files are installed, but that did not solve the issue apparently because I am using PHP 5.4.

 

In my case i had to create a file .user.ini in my public_html directory (because there was no such file) and put the following line in the file max_input_vars = 3500

 

So if you are using PHP 5.2 you shoud try to put php_value max_input_vars 4000 in .htaccess in the directory where prestashop files are installed;

and if you are using PHP 5.3 or PHP 5.4 you should try to put max_input_vars = 3500 in .user.ini in the public_html directory.

 

Hope this helps B)

 

Thanks a lot Ixus, this worked for me (.user.ini in public_html dir) with Siteground hosting.

Link to comment
Share on other sites

this worked for me.

 

 


In my case i had to create a file .user.ini in my public_html directory (because there was no such file) and put the following line in the file max_input_vars = 3500


and if you are using PHP 5.3 or PHP 5.4 you should try to put max_input_vars = 3500 in .user.ini in the public_html directory.
 

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

Hi everybody!

 

I also had a problem with this.

 

I have tried to put php_value max_input_vars 4000 in .htaccess whitch I found in the folder where all prestoshop files are installed, but that did not solve the issue apparently because I am using PHP 5.4.

 

In my case i had to create a file .user.ini in my public_html directory (because there was no such file) and put the following line in the file max_input_vars = 3500

 

So if you are using PHP 5.2 you shoud try to put php_value max_input_vars 4000 in .htaccess in the directory where prestashop files are installed;

and if you are using PHP 5.3 or PHP 5.4 you should try to put max_input_vars = 3500 in .user.ini in the public_html directory.

 

Hope this helps B)

 

Good to know that this solved three members problem that we know so far.

 

Thanks for sharing. 

  • Like 1
Link to comment
Share on other sites

I have the same problem I have tried to add "php_value max_input_vars 4000" in the .htaccess file (htdocs/ .htaccess  was that right??)   but it didnt work. Am using PS 1.5.6.1 and PHP 5.4  with Fasthosts. Have tried asking them to increase limit but they say they cant....without upgrading...

 

I haven't tried creating a .user.ini file in my public_html directory yet as I dont know where that is and am having trouble finding it! Can anyone point me in the right direction please?  :blush: 

 

many thanks

Link to comment
Share on other sites

I have the same problem I have tried to add "php_value max_input_vars 4000" in the .htaccess file (htdocs/ .htaccess  was that right??)   but it didnt work. Am using PS 1.5.6.1 and PHP 5.4  with Fasthosts. Have tried asking them to increase limit but they say they cant....without upgrading...

 

I haven't tried creating a .user.ini file in my public_html directory yet as I dont know where that is and am having trouble finding it! Can anyone point me in the right direction please?  :blush: 

 

many thanks

create a file called .user.ini  put only this line in it  max_input_vars = 3500

ftp it to public_html folder on your server

 

thats it.

Link to comment
Share on other sites

Hi Greg, 

 

Many thanks for your reply, however I need a bit more help in where to find the public_html folder. I have looked but cant seem to find it. Apologies for sounding so thick, I am a total newbie to this (i.e. imagine you are explaining it to your granny - and then simplify it!!!).  :unsure:

 

Also how do I create a new file exactly? I have had a look on Filezilla but cant see anything obvious...like "create new file" !

 

thanks for your help - greatly appreciated

Link to comment
Share on other sites

Hi Greg, 

 

Many thanks for your reply, however I need a bit more help in where to find the public_html folder. I have looked but cant seem to find it. Apologies for sounding so thick, I am a total newbie to this (i.e. imagine you are explaining it to your granny - and then simplify it!!!).  :unsure:

 

Also how do I create a new file exactly? I have had a look on Filezilla but cant see anything obvious...like "create new file" !

 

thanks for your help - greatly appreciated

here is public_html with filezilla  http://www.youtube.com/watch?v=A87zJOpF07A

 

i don't use filezilla, but i assume this is how you would do it.

create the file on your desktop using notepad (right click in blank space on desktop, create new text document, paste max_input_vars = 3500 into it ) and click save as and use the filename  ".user.ini"   then drag that file to filezilla directory public_html

Edited by greg barratt (see edit history)
  • Like 1
Link to comment
Share on other sites

Thanks for helpful reply, unfortunately it seems I dont have a public_html folder! All I have from the root directory is the htdocs folder and logfiles, I have opened both of those up and cant seem to find any such folder. Bit strange or bit simple?!

Link to comment
Share on other sites

All done... but still not working...maybe need to change hosting?  :(

 

Maybe. You should really contact them to find out whats going on. If they are using user.ini or php.ini , you still might not be able to change it from your side. 

 

Sometimes hosting providers do not allow you to change those file(s) via FTP. Although it's not ideal and the better hosting providers definitely allow you to change it. 

  • Like 1
Link to comment
Share on other sites

I think you might be right there Ben, thank you for your input and thank you very much Greg for taking me through the steps, shame it didnt work with Fasthosts   :(  

 

It shouldn't be that big a deal for them. Be wary that if they say you need to upgrade your plan or if they give much hassle at all, you should switch. This configuration file is extremely common for users to edit themselves and they should change it no problem.

  • Like 1
Link to comment
Share on other sites

Just to update for anyone else in same situation, Fasthosts say I dont have access to the files and the max_input_vars cannot be increased above the set limit of 1000 unless I upgrade to a private server. What a crock!

 

Off to see which hosting provider can offer a better service - any recommendations for UK (or near) hosting providers very welcome!

 

Thanks everyone for your help yet again  :)

Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...

I was frustrated by this because none of the above was working for me.  I fought with it for a couple of hours before eventually doing what I should have done in the first place... ask my host :)

 

They upped it to 2000 (I asked for that because at first the error I got suggested I only needed ~1200).

 

Then I went to change a different translation and got the same time, this time saying I needed 5600!!.  Well, crap.  I figured there was no way the host would do that, but instead of upping it to 6000... they simply gave me control over it.  They added an option in cPanel where I can adjust that (and more) whenever I need to.  It came with a brief and friendly warning that it may open my site up for attack, but that THEY aren't concerned about it because the way they have things set up, it can only affect my site and not others on the shared server.  Fair enough!

 

So I have to applaud StableHost for a) being this flexible and B) their concern (and action) regarding the fair use so that I'm not affecting others and, consequently, they aren't affecting me!

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

  • 1 month later...
  • 11 months later...

Hi HJ

I sorted my issue by switching to Vidahost who happily increased my limit at no extra charge, twice!

All worked fine once the limit was increased. Simple!

Probably need to check with your hosting provider. Highly recommend Vidahost if you need to switch.

Good luck.

  • Like 1
Link to comment
Share on other sites

thanks Tanda .. im using hostgator , frankly they are pretty good too .. the question is : i cant find the command the previous replies were talking about,, probably cuz of the new Prestashop version, i do have .htaccess file but im not sure where to add the command :).

Link to comment
Share on other sites

×
×
  • Create New...