/**
  * @phutil-external-symbol function phabricator_read_config_file
  */
 public function __construct($config)
 {
     $root = dirname(phutil_get_library_root('phabricator'));
     require_once $root . '/conf/__init_conf__.php';
     $dictionary = phabricator_read_config_file($config);
     $dictionary['phabricator.env'] = $config;
     $this->setSource(new PhabricatorConfigDictionarySource($dictionary));
 }
示例#2
0
        $url = parse_url($_SERVER['REQUEST_URI']);
        $_REQUEST['__path__'] = $url['path'];
    } else {
        phabricator_fatal_config_error("__path__ is not set. Your rewrite rules are not configured correctly.");
    }
}
if (get_magic_quotes_gpc()) {
    phabricator_fatal_config_error("Your server is configured with PHP 'magic_quotes_gpc' enabled. This " . "feature is 'highly discouraged' by PHP's developers and you must " . "disable it to run Phabricator. Consult the PHP manual for instructions.");
}
register_shutdown_function('phabricator_shutdown');
require_once dirname(dirname(__FILE__)) . '/conf/__init_conf__.php';
try {
    setup_aphront_basics();
    $overseer = new PhabricatorRequestOverseer();
    $overseer->didStartup();
    $conf = phabricator_read_config_file($env);
    $conf['phabricator.env'] = $env;
    PhabricatorEnv::setEnvConfig($conf);
    // This needs to be done before we create the log, because
    // PhabricatorAccessLog::getLog() calls date()
    $tz = PhabricatorEnv::getEnvConfig('phabricator.timezone');
    if ($tz) {
        date_default_timezone_set($tz);
    }
    // Append any paths to $PATH if we need to.
    $paths = PhabricatorEnv::getEnvConfig('environment.append-paths');
    if (!empty($paths)) {
        $current_env_path = getenv('PATH');
        $new_env_paths = implode(':', $paths);
        putenv('PATH=' . $current_env_path . ':' . $new_env_paths);
    }
示例#3
0
<?php

return array('phabricator.developer-mode' => true, 'darkconsole.enabled' => true, 'celerity.minify' => false) + phabricator_read_config_file('default');
<?php

return array('phabricator.base-uri' => 'http://{{domain}}/', 'mysql.host' => 'localhost', 'mysql.user' => 'root', 'metamta.default-address' => 'phabricator@{{domain}}', 'metamta.domain' => '{{domain}}', 'phabricator.timezone' => 'America/New_York', 'pygments.enabled' => true) + phabricator_read_config_file('production');
<?php

/*
 * Copyright 2011 Facebook, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
return array('darkconsole.enabled' => true, 'celerity.force-disk-reads' => true) + phabricator_read_config_file('default');
<?php

/*
 * Copyright 2011 Facebook, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
return array() + phabricator_read_config_file('default');
<?php

return array('phabricator.base-uri' => 'http://{{domain}}/', 'mysql.host' => 'localhost', 'mysql.user' => 'root', 'metamta.default-address' => 'phabricator@{{domain}}', 'metamta.domain' => '{{domain}}', 'phabricator.timezone' => 'Europe/London', 'pygments.enabled' => true) + phabricator_read_config_file('development');
示例#8
0
<?php

/*
 * Copyright 2012 Facebook, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
return array('darkconsole.enabled' => true, 'celerity.force-disk-reads' => true, 'phabricator.show-stack-traces' => true, 'phabricator.show-error-callout' => true, 'celerity.minify' => false) + phabricator_read_config_file('default');