bamoore91 Posted July 23, 2017 Share Posted July 23, 2017 (edited) Hello All, I'm having an issue generating a large amount of combination. Every time it throws error The CSRF token is invalid. Please try to resubmit the form.Checking the PHP Log it shows: [:error] [pid 14053] [client 10.20.1.2:48994] PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0, referer: http://10.0.0.72/admin670uvmbrg/index.php/product/form/66?_token=Kul0-aW9GpOLg5L6I7Gup7_bcw371EM_c_yP4tkGusk I've increased the max_input_vars in the php.ini file to 20000 just for testing and it still throws the same error of Input variables exceeded 1000. Am I missing something else? Server Information: Server information: Linux #106-Ubuntu SMP Mon Jun 26 17:54:43 UTC 2017 x86_64 Server software version: Apache/2.4.18 (Ubuntu) PHP version: 7.0.18-0ubuntu0.16.04.1 Memory limit: 4096M Max execution time: 40000 Upload Max File size: 16M PrestaShop version: 1.7.1.1 Thanks! Edited July 23, 2017 by bamoore91 (see edit history) Link to comment Share on other sites More sharing options...
Sgt1966 Posted January 12, 2018 Share Posted January 12, 2018 And so - months later on Version 1.7.2.4 - same bug exists. The CSRF token is invalid. Please try to resubmit the form. when adding "combinations".... example: An Engagement ring - adding Ring sizes and Metal Choices to select from.... Then click on Save and Wham - you get the above error that prevents you from saving the product. When will this get fixed ? Link to comment Share on other sites More sharing options...
musicmaster Posted January 14, 2018 Share Posted January 14, 2018 (edited) Did you check with phpinfo() that your number was indeed increased? Many installations have more than one php.ini and it is easy to make a change on the wrong place. Edited February 26, 2018 by musicmaster (see edit history) Link to comment Share on other sites More sharing options...
robb84 Posted January 17, 2018 Share Posted January 17, 2018 You have to increase the max_input_vars in php.ini, or the web host do it for you. Link to comment Share on other sites More sharing options...
Martina89 Posted February 26, 2018 Share Posted February 26, 2018 I get the same error "The CSRF token is invalid. Please try to resubmit the form. " when I try to save a new product. I raised the max_input_vars to 20000 but I still get the same problem. Any other suggestions? Link to comment Share on other sites More sharing options...
chirag_0110 Posted August 3, 2018 Share Posted August 3, 2018 Hello All, I have the same issue when product have a more then 50 combinations. I have changed in max_input_vars = 100000 in php.ini file but no luck. When I added this line in to .htaccess file in root of PrestsShop store it's work php_value max_input_vars 100000 Cheers! Link to comment Share on other sites More sharing options...
selectshop.at Posted August 3, 2018 Share Posted August 3, 2018 max_input_vars over 10000 is not necessary. This value satisfies a shop with 50.000 products and 3 mio attributes/combinations. The problem of CSFR probably is: Your server's firewall is misconfigured. CSRF = Cross-site request forgery.CSFR token can also be a browser problem and / or firewall in use on your local machine, if for ex. you are using an ad-blocker or cookie-blocker. Link to comment Share on other sites More sharing options...
Peter Petrik Posted April 24, 2021 Share Posted April 24, 2021 This working for me: php_value max_input_vars 100000 PS 1773 Link to comment Share on other sites More sharing options...
raultamayomate Posted June 5, 2021 Share Posted June 5, 2021 Hi, try this. Create a file in document root where is index.php, called ".env" or if you almost have a file called .env, add a new line whith this content: _TOKEN_=disabled Greetings Link to comment Share on other sites More sharing options...
stefano813 Posted May 25, 2022 Share Posted May 25, 2022 I solved the problem downgrading from PHP 7.4 to 7.3 Link to comment Share on other sites More sharing options...
NestorAcevedo Posted May 31, 2022 Share Posted May 31, 2022 (edited) My case is only in a specific product, without any combinations where I get the issue: I was checking today another products and I was able to save my changes, but the first one product I added in my store has this issue. Edited May 31, 2022 by NestorAcevedo (see edit history) 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