} 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); } // This is the earliest we can get away with this, we need env config first. PhabricatorAccessLog::init();