piwik/core/Config.php
/**
     * Read configuration from files into memory
     *
     * @throws Exception if local config file is not readable; exits for other errors
     */
Read configuration from files into memory
@throws Exception if local config file is not readable; exits for other errors
Read configuration from files into memory @throws Exception if local config file is not readable ; exits for other errors
public function init()
    {
        $this->clear();
        $this->initialized = true;
        $reportError = SettingsServer::isTrackerApiRequest();
        if (!is_readable($this->pathGlobal) && $reportError) {
            throw new Exception(Piwik::translate('General_ExceptionConfigurationFileNotFound', array($this->pathGlobal)));
        }
        try {
            $this->configGlobal = $this->iniReader->readFile($this->pathGlobal);
        } catch (IniReadingException $e) {
            if ($reportError) {
                throw new Exception(Piwik::translate('General_ExceptionUnreadableFileDisabledMethod', array($this->pathGlobal, "parse_ini_file()")));
            }
        }
        try {
            if (file_exists($this->pathCommon)) {
                $this->configCommon = $this->iniReader->readFile($this->pathCommon);
            } else {
                $this->configCommon = false;
            }
        } catch (IniReadingException $e) {
            $this->configCommon = false;
        }
        $this->checkLocalConfigFound();
        try {
            $this->configLocal = $this->iniReader->readFile($this->pathLocal);
        } catch (IniReadingException $e) {
            if ($reportError) {
                throw new Exception(Piwik::translate('General_ExceptionUnreadableFileDisabledMethod', array($this->pathLocal, "parse_ini_file()")));
            }
        }
    }
public function init ( ) { $ this -> clear ( ) ; $ this -> initialized = true ; $ reportError = SettingsServer :: isTrackerApiRequest ( ) ; if ( ! is_readable ( $ this -> pathGlobal ) && $ reportError ) { throw new Exception ( Piwik :: translate ( 'General_ExceptionConfigurationFileNotFound' , array ( $ this -> pathGlobal ) ) ) ; } try { $ this -> configGlobal = $ this -> iniReader -> readFile ( $ this -> pathGlobal ) ; } catch ( IniReadingException $ e ) { if ( $ reportError ) { throw new Exception ( Piwik :: translate ( 'General_ExceptionUnreadableFileDisabledMethod' , array ( $ this -> pathGlobal , " parse_ini_file() " ) ) ) ; } } try { if ( file_exists ( $ this -> pathCommon ) ) { $ this -> configCommon = $ this -> iniReader -> readFile ( $ this -> pathCommon ) ; } else { $ this -> configCommon = false ; } } catch ( IniReadingException $ e ) { $ this -> configCommon = false ; } $ this -> checkLocalConfigFound ( ) ; try { $ this -> configLocal = $ this -> iniReader -> readFile ( $ this -> pathLocal ) ; } catch ( IniReadingException $ e ) { if ( $ reportError ) { throw new Exception ( Piwik :: translate ( 'General_ExceptionUnreadableFileDisabledMethod' , array ( $ this -> pathLocal , " parse_ini_file() " ) ) ) ; } } }
Read configuration from files into memory
 @throws Exception if local config file is not readable; exits for other errors
Read configuration from files into memory @throws Exception if local config file is not readable ; exits for other errors
// read defaults from global.ini.php // Check config.ini.php last