From b3509b8db31a0a86d10de880aa479a5cc862abd9 Mon Sep 17 00:00:00 2001 From: Torsten Stelling Date: Sat, 29 Jun 2013 19:04:32 +0200 Subject: [PATCH] Fix for other Symlinks --- fever/index.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/fever/index.php b/fever/index.php index 86e3e9b..f35f0fb 100755 --- a/fever/index.php +++ b/fever/index.php @@ -6,15 +6,21 @@ exit; } - error_reporting(E_ERROR | E_PARSE); - $tt_root = dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME']))).'/'; - require_once $tt_root."config.php"; + $tt_root = dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME']))); + $tt_root2 = $tt_root; + if (file_exists($tt_root."/config.php")) { + require_once $tt_root."/config.php"; + } else { //if (file_exists("../../config.php")) { + $tt_root = "../.."; + $tt_root2 = dirname(dirname(dirname(__FILE__))); + require_once $tt_root."/config.php"; + } set_include_path(dirname(__FILE__) . PATH_SEPARATOR . - $tt_root . PATH_SEPARATOR . - $tt_root . "/include" . PATH_SEPARATOR . + $tt_root2 . PATH_SEPARATOR . + $tt_root2 . "/include" . PATH_SEPARATOR . get_include_path()); chdir($tt_root);