+ set_time_limit(0);
+
+ // Ensure that all "strtotime" operations do run timezone independent
+ date_default_timezone_set('UTC');
+
+ // This has to be quite large to deal with embedded private photos
+ ini_set('pcre.backtrack_limit', 500000);
+
+ set_include_path(
+ get_include_path() . PATH_SEPARATOR
+ . $this->getBasePath() . DIRECTORY_SEPARATOR . 'include' . PATH_SEPARATOR
+ . $this->getBasePath() . DIRECTORY_SEPARATOR . 'library' . PATH_SEPARATOR
+ . $this->getBasePath());
+
+ $this->profiler->reset();
+
+ if ($this->mode->has(App\Mode::DBAVAILABLE)) {
+ $this->profiler->update($this->config);
+
+ Core\Hook::loadHooks();
+ $loader = (new Config())->createConfigFileLoader($this->getBasePath(), $_SERVER);
+ Core\Hook::callAll('load_config', $loader);
+ }
+
+ $this->loadDefaultTimezone();
+ // Register template engines
+ Core\Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');