I am running pma through composer and would like to be able to have a config file somewhere that is not in the root of pma
Setting an include path in apache to /my/custom/path which has the config file does not work (probably because the configs are coded to the specific path './config.inc.php'
if this was #config.inc.php', php would be able to use my custom include path and load the right file
You should be able to accomplish this with
./libraries/vendor_config.php
. For instance, I just tested by editing the line likedefine('CONFIG_DIR', '/etc/custom/pma/');
-- you should be able to do something similar.The whole point of composer is that you dont modify the files directly, the next time its updated or whatever those changes are lost.
That is not a fix at all
Sorry then, I'm not sure what can be done. If modifying the files directly isn't an option, what other solution do you suggest in this case?
one way would be to allow specifying an env var, check if that exists and use it.
then the server could have something like export PMA_CONFIG='/some/random/path/config.inc.php'
(prob easiest)
Another would be setting the include path as ./ in pma, then having the config included with:
require 'config.inc.php' // no ./
then php.ini could include another location before pma sets ./ include path. php would check the php.ini defined one first and then the inside pma root
I know that sometimes, the distinction is subtle between a bug and a feature request. Also, eventually, we'll just list all of these as "issues". But meanwhile, I suggest to classify this one as a feature request, as the only intended way to specify the config file location is to let the vendor (for example Debian) change it.
Marc, can the ticket be moved or should dogmatic69 create a new feature request?
Ticket moved from /p/phpmyadmin/bugs/4446/
Should be fixed with https://github.com/phpmyadmin/phpmyadmin/commit/6f4e0b2a77859e438df39990ba44a6b74f7ed5eb