Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento - Lengthy Custom Options Not Saving

I have a few websites that are experiencing the same issue.

I have products which have several custom options and while adding them (up to a certain point) they were adding in fine. It seems that once I get to a certain level of options the website fails to save any more. The website gives the impression that the new options have saved but when I go back in to the product the options are not there.

As you can imagine this is fairly frustrating and my obvious point of contact for getting this resolved was with my server host. I have a dedicated server with UKFast (who are usually top notch at getting any issues like this resolved). Problem is they claim it is not a server related issue as there are no errors being thrown up.

They have every increased memory limits etc etc for me with no luck.

I have found several posts with similar issues, all blaming hosting environment and recommending increasing limits such as this:

memory_limit = 1024M
upload_max_filesize = 200M
post_max_size = 200M
max_input_vars = 10000

Which my host has actioned but with no success.

Can anyone recommend anything that may get me out of this jam?

like image 960
Dan Davies Avatar asked Dec 06 '25 19:12

Dan Davies


1 Answers

From what you said, it seems the problem is in max_input_vars where PHP is not able to post all of your custom options. I would suggest to increase this in .htaccess and see if it helps. I agree 10000 value is quite sufficient for most of the cases, but may be the server was not restarted after this value was set in php.ini?

I would recommend to add max_input_vars = 20000 just for this time saving the custom options, to see whether the issue was that only. Do this in your .htaccess as it will not require you to restart the server. You can find how to do this using my very recent blog post here: http://ka.lpe.sh/2014/10/07/magento-code-already-exists-fix/

Basically it's just adding the below line in your .htaccess and trying to save custom options again in Magento.

php_value max_input_vars 20000

Remove the above line after your have saved your custom options and make it permanent by adding it in php.ini file. Once again, 10000 value should be quite enough for this.

like image 180
Kalpesh Avatar answered Dec 08 '25 08:12

Kalpesh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!