Post by goodguyssigns » Thu Sep 19, 2019 10:46 pm

When I enter over a certain nubmer of optionsI get his error

Undefined index: option_value_id in /admin/model/catalog/product.php on line 241

I have tried setting max_input_vars as high as 190000 to see if the suggested changes fixes it, but it does not.

We have an option for color that may have as many as 60 colors. Are there any other settings to avoid this issue.

Newbie

Posts

Joined
Wed Apr 10, 2019 9:20 pm

Post by opencartmart » Thu Sep 19, 2019 11:42 pm

goodguyssigns wrote:
Thu Sep 19, 2019 10:46 pm
I have tried setting max_input_vars as high as 190000 to see if the suggested changes fixes it, but it does not.
How did you increase? Make sure it has increased properly. If you are increasing using php.ini, try adding in .user.ini file because configuration file may be different depending on php configuration.

Create a php file info.php and add following code and upload it on the admin directory. Then access it using browser to check the current of max_input_vars

Code: Select all

<?php
phpinfo();
?>

XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart


Active Member

Posts

Joined
Wed Oct 02, 2013 3:59 am

Post by goodguyssigns » Fri Sep 20, 2019 12:36 am

Thank you:

The server is running nginx+php-fpm
PHP version is 7.2
In php.ini, I have (only changed to 190000 for testing)

max_input_vars = 9000

In admin/controller/product/edit, I added
echo count($this->request->post, COUNT_RECURSIVE) - count($this->request->post);
This gives me 1108 on the failed posts. Posts under 1000 work as expected.

In /etc/php-fpm.d/www.conf, I added
php_value[max_input_vars] = 10000

In /etc/nginx/fastcgi_params, I added
fastcgi_param PHP_VALUE max_input_vars=9000;

For each change, nginx and php-fpm were issues a full stop and check to ensure the process was actually stopped before starting again.

There are no user.ini or directory level php.ini files

Is there anything in the code which limits form fields or array recursion?
Are there any other locations I can look for?

Newbie

Posts

Joined
Wed Apr 10, 2019 9:20 pm

Post by goodguyssigns » Fri Sep 20, 2019 12:50 am

I added aa .user.ini file under admin

ini_get() gives me


number of posted fields = 1108
post_max_size = 100M
max input vars = 9001 - this is from the .user.ini I added to /admin
post_max_size in bytes = 100M
Notice: Undefined index: option_value_id in ****/admin/model/catalog/product.php on line 241

Newbie

Posts

Joined
Wed Apr 10, 2019 9:20 pm

Post by letxobnav » Fri Sep 20, 2019 8:17 am

instead of fiddling with the numbers you do not understand, output the post variables to the error log and see if they are cut-off.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by paulfeakins » Fri Sep 20, 2019 5:25 pm

goodguyssigns wrote:
Fri Sep 20, 2019 12:50 am
max input vars = 9001 - this is from the .user.ini I added to /admin
Try increasing this to 100000 and verifying that it has taken effect first before trying again.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: Bing [Bot], Shiftcom and 409 guests