If php works with apache as module, then I need to set the php directives (PHP_INI_PERDIR) using .htaceess with php_value or php_flag.
Else, I need to create my own .user.ini file with this directives.
Now, if a new directive appears, I must edit both files, because I want to create my app available for both cases.
The question:
What if, only if ini_get returns incorrect values, I create the .htaccess or the .user.ini file using php and redirect after ? Redirect because this can't be done on the fly.
In this way, I let the php to do all the work for me with a config file which contains the directives.
Is this a bad idea ? If yes, please tell me what could go wrong ?
I need to upload my app on multiple servers and I want to edit configurations as less as I can.