--- mambo/branches/4.6/includes/core.classes.php 2006/06/08 09:17:26 561 +++ mambo/branches/4.6/includes/core.classes.php 2006/07/02 17:05:31 583 @@ -218,7 +218,8 @@ function mamboCore () { global $adminside; $this->init_errorlevel = error_reporting(0); - $this->rootPath = str_replace('\\', '/', realpath(str_replace('includes', '', dirname(__FILE__)))); + //$this->rootPath = str_replace('\\', '/', realpath(str_replace('includes', '', dirname(__FILE__)))); + $this->rootPath = str_replace('\\', '/',str_replace('/includes', '', dirname(__FILE__))); $this->checkConfig(); $this->Itemid = mosGetParam($_REQUEST, 'Itemid', 0); $this->getConfig(); @@ -245,7 +246,8 @@ * @return unknown */ function rootPath () { - if (realpath($this->rootPath) === false) die ('Invalid program load path'); + //if (realpath($this->rootPath) === false) die ('Invalid program load path'); + if (file_exists($this->rootPath) === false) die ('Invalid program load path'); return $this->rootPath; } @@ -258,7 +260,8 @@ function get ($property) { $config =& mamboCore::getMamboCore(); if ($property == 'mosConfig_absolute_path') { - if (realpath($config->mosConfig_absolute_path) === false) die ('Invalid program load path'); + //if (realpath($config->mosConfig_absolute_path) === false) die ('Invalid program load path'); + if (file_exists($config->mosConfig_absolute_path) === false) die ('Invalid program load path'); else return $config->rootPath; } if (isset($config->$property)) return $config->$property; @@ -340,7 +343,6 @@ $mamboroot = str_replace('\\', '/', rtrim($this->rootPath, '\/')); $this->subdirectory = substr($mamboroot, strlen($docroot)); - $scheme = isset($_SERVER['HTTP_SCHEME']) ? $_SERVER['HTTP_SCHEME'] : ((isset($_SERVER['HTTPS']) AND strtolower($_SERVER['HTTPS'] != 'off')) ? 'https' : 'http'); if (isset($_SERVER['HTTP_HOST'])) { $withport = explode(':', $_SERVER['HTTP_HOST']);