I am building a Modules for SUgarCRM that is in PHP.
When a user installs the module, I have access to a script that can be run as part of the install process...
I basically need to modify the .htaccess file and increase the max_input_vars INI setting.
So I need to have code that:
- Reads the PHP INI setting for
max_input_varsthis part is easy. If it is lower than say 3000 I need to increase it in the .htaccess file - Read in the contents of the .htaccess file
- Add this value to the htacess
php_value max_input_vars 3000 - Save the .htaccess file with all the old contents as well as the new setting
Is this even practical? I think I have seen WordPress do such an action before and I will look there for help/ideas too but I could use any help in this?