Index: trunk/core/kernel/startup.php =================================================================== diff -u -N -r6647 -r6650 --- trunk/core/kernel/startup.php (.../startup.php) (revision 6647) +++ trunk/core/kernel/startup.php (.../startup.php) (revision 6650) @@ -35,6 +35,10 @@ define('APPLICATION_CLASS', isset($vars['ApplicationClass']) ? $vars['ApplicationClass'] : 'kApplication'); define('APPLICATION_PATH', isset($vars['ApplicationPath']) ? $vars['ApplicationPath'] : '/core/kernel/application.php'); + if (isset($vars['WriteablePath'])) { + define('WRITEABLE', FULL_PATH.$vars['WriteablePath']); + } + if ($vars === false || count($vars) == 0) { global $rootURL; echo 'In-Portal is probably not installed, or configuration file is missing.
'; Index: trunk/core/kernel/utility/debugger.php =================================================================== diff -u -N -r6428 -r6650 --- trunk/core/kernel/utility/debugger.php (.../debugger.php) (revision 6428) +++ trunk/core/kernel/utility/debugger.php (.../debugger.php) (revision 6650) @@ -153,7 +153,7 @@ $this->baseURL = PROTOCOL.SERVER_NAME.rtrim(BASE_PATH, '/').$kernel_path.'/utility/debugger'; // save debug output in this folder - $this->tempFolder = FULL_PATH.'/kernel/cache'; + $this->tempFolder = defined('WRITEABLE') ? WRITEABLE.'/cache' : FULL_PATH.'/kernel/cache'; } function mapLongError($msg) @@ -846,6 +846,7 @@ return ''; } + $dbg_path = str_replace(FULL_PATH, '', $this->tempFolder); ob_start(); ?> @@ -865,7 +866,7 @@ $Debugger.DOMViewerURL = ''; $Debugger.EditorPath = ''; $Debugger.RowSeparator = 'rowSeparator; ?>'; - $Debugger.DebugURL = 'baseURL.'/debugger_responce.php?sid='.$this->rowSeparator; ?>'; + $Debugger.DebugURL = 'baseURL.'/debugger_responce.php?sid='.$this->rowSeparator.'&path='.urlencode($dbg_path); ?>'; IsFatalError || DBG_RAISE_ON_WARNINGS) { echo '$Debugger.Toggle();'; Index: trunk/core/kernel/utility/debugger/debugger_responce.php =================================================================== diff -u -N -r6093 -r6650 --- trunk/core/kernel/utility/debugger/debugger_responce.php (.../debugger_responce.php) (revision 6093) +++ trunk/core/kernel/utility/debugger/debugger_responce.php (.../debugger_responce.php) (revision 6650) @@ -2,9 +2,10 @@ define('FULL_PATH', realpath(dirname(__FILE__).'/../../../..') ); $sid = $_GET['sid']; + $path = isset($_GET['path']) ? $_GET['path'] : '/kernel/cache'; if (!preg_match('/^@([\d]+)@$/', $sid)) exit; - - $debug_file = FULL_PATH.'/kernel/cache/debug_'.$sid.'.txt'; + + $debug_file = FULL_PATH.$path.'/debug_'.$sid.'.txt'; if (file_exists($debug_file)) { $ret = file_get_contents($debug_file); $ret = str_replace('#DBG_FILESIZE#', formatSize( filesize($debug_file) ), $ret); @@ -13,16 +14,16 @@ else { $ret = 'file not found'; } - - + + if (function_exists('gzencode') && strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) { header('Content-Encoding: gzip'); echo gzencode($ret); } else { echo $ret; } - + /** * Formats file/memory size in nice way *