phpmyadmin is working fine but I can't find config.inc.php file?

前端 未结 5 450
悲哀的现实
悲哀的现实 2021-01-12 00:15

This is weird

I have phpmyadmin 4.2.5 installed on my Windows 7 machine, it currently is working fine and located in localhost/phpmyadmin

I can view, edit, c

5条回答
  •  误落风尘
    2021-01-12 01:03

    Open up [web_root]/libraries/Config.class.php add these lines to the beginning of the method load:

          var_dump( $this->default_source);
          var_dump( CONFIG_FILE);
          die; 
    

    Open phpmyadmin. This is the order of config files loaded, they make a variable $cfg which is the config of PMA, for me the output was:

    '[mywebroot]./libraries/config.default.php'
    '/etc/phpmyadmin/config.inc.php'
    

    Make sure the last file, which is for local changes, exist and have correct permissions. Then get rid of the added lines.

    More info

    PMA loads it's global configuration in the file libraries/common.inc.php:306.

    $GLOBALS['PMA_Config'] = new PMA_Config(CONFIG_FILE);
    

    The global is an instance of PMA_Config whose constructor calls the loadmethod. In load method, the parameter passed to the constructor, CONFIG_FILE is used to load the configuration.

提交回复
热议问题