The max_input_vars parameter is a PHP configuration directive that limits the number of variables your server can process in a single function call. These variables include data sent via GET and POST requests, as well as cookies.
In the mybox ecosystem, the default limit is set to 6000. This threshold is designed to protect your server’s resources from potential denial-of-service (DoS) attacks that use hash collisions. However, for modern, data-heavy web applications, this default may need adjustment.
Table of Contents
Why increase max_input_vars?
When a form or configuration page exceeds the max_input_vars limit, PHP stops processing any additional data. This results in data loss without showing a specific error message on the page.
Common scenarios where an increase is necessary include:
- WordPress Menu & Theme Settings: Large navigation menus or complex theme customizers often send hundreds of variables at once.
- E-commerce Management: In PrestaShop or WooCommerce, saving a product with many variations or bulk-updating an inventory list can exceed the limit.
- Advanced Page Builders: Plugins like ACF (Advanced Custom Fields) or WPML (for translations) generate a high volume of input fields on a single page.
Practical Implications
If you notice that settings “revert” after you click save, or if only a portion of a long form is being recorded in your database, it is likely that the max_input_vars limit has been reached. Increasing this value ensures that the mybox panel and your PHP environment can process the full scope of your application’s requests.
How to increase max_input_vars
At mybox, you can adjust PHP parameters directly through your website’s configuration files rather than editing a global php.ini file. This allows for specific settings for each individual project.
To change the limit via .htaccess:
- Connect to your server using FTP.
- Locate the
.htaccessfile in your website’s root directory (typically/public_html). - Add the following line to the bottom of the file:
php_value max_input_vars 8000 - Save the file and refresh your application to test the change.
Summary
The max_input_vars parameter ensures that complex forms and large datasets are processed completely by your server. While 6000 is sufficient for most websites, increasing this to 8000 or higher is a standard adjustment for advanced CMS configurations and e-commerce platforms.