I have a few versions of php on my server, and each version has the following modes; apache2, cgi, cli, fpm, which in turn each have their own php.ini. So that's 6 x 4 = 24 php.ini files for my present install. Running md5sum on them, a lot (but not all) are different. So, I'm thinking of making one php.ini file and using it for all the php versions and operating modes. Is this a BAD idea? If it's bad, which versions/modes need special care when setting up? Is there a way of doing diffs across multiple files combinations so one can quickly see the differences? How are the rest of you folks handling this combinatory explosion?
I use the standard php.ini file as installed with the package manager and overwrite the settings I am interested in via other ini files. In fact, the php.ini file has almost no important settings. All the settings are being done in /etc/php/7.x/[cgi/cli/fpm]/conf.d/ where all the files are symlinks to /etc/php/7.x/mods-available That is where I do global options and they are then valid for all cgi/cli/fpm. Just different for different php versions. But this should be the case because these versions have different capabilities. Per web/user options are done via ispconfig.