Menu

#1531 (ok 4.5) Cant use external config file

Needs_decision
resolved
None
Normal
2015-06-25
2014-06-09
dogmatic69
No

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

Discussion

  • Isaac Bennetch

    Isaac Bennetch - 2014-06-10

    You should be able to accomplish this with ./libraries/vendor_config.php. For instance, I just tested by editing the line like define('CONFIG_DIR', '/etc/custom/pma/'); -- you should be able to do something similar.

     
  • dogmatic69

    dogmatic69 - 2014-06-10

    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

     
  • Isaac Bennetch

    Isaac Bennetch - 2014-06-11

    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?

     
  • dogmatic69

    dogmatic69 - 2014-06-11

    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

     
  • Marc Delisle

    Marc Delisle - 2014-06-11

    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.

     
  • Isaac Bennetch

    Isaac Bennetch - 2014-06-18

    Marc, can the ticket be moved or should dogmatic69 create a new feature request?

     
  • Marc Delisle

    Marc Delisle - 2014-06-18

    Ticket moved from /p/phpmyadmin/bugs/4446/

     
  • Madhura Jayaratne

    • assigned_to: Madhura Jayaratne
    • Group: Latest_Git --> Needs_decision
     
  • Madhura Jayaratne

    • summary: Cant use external config file --> (ok 4.5) Cant use external config file
    • status: open --> resolved