log(str_repeat("\\", 80));
$O->log(str_repeat("/", 80));
}
$O->log("INTERNAL ERROR: $message");
echo '
' . "\n";
echo '
INTERNAL ERROR:
' . "\n";
echo '
' . $message . '
' . "\n";
echo '
This error was not caused by anything that you did wrong.' . "\n";
echo '
It is a problem within the application itself and should be reported to the administrator.
' . "\n";
// Print out the entire stack trace
$O->log(str_repeat("-", 30));
$O->log("Stack:");
echo '
' . "\nStack Trace:\n";
echo '
' . "\n";
$trace = array_slice(debug_backtrace(false), $drop);
for ($i = 0; $i < count($trace); ++$i) {
$bline = $trace[$i]['line'];
$bfile = $trace[$i]['file'];
$bfile = str_replace(ROOT.DS, '', $bfile);
$bfile = str_replace(CAKE_CORE_INCLUDE_PATH.DS, '', $bfile);
if ($i < count($trace)-1) {
$bfunc = $trace[$i+1]['function'];
$bclas = $trace[$i+1]['class'];
} else {
$bfunc = null;
$bclas = null;
}
$O->log(" $bfile:$bline (" . ($bclas ? "$bclas::$bfunc" : "entry point") . ")");
echo("- $bfile:$bline (" . ($bclas ? "$bclas::$bfunc" : "entry point") . ")
\n");
}
echo "
\n";
$O->log(str_repeat("-", 30));
$O->log("HTTP Request:");
echo '
' . "\nHTTP Request:\n";
echo '
' . "\n";
foreach($_REQUEST AS $k => $v) {
$O->log(sprintf(" %-20s => %s", $k, $v));
echo("- $k => $v
\n");
}
echo "
\n";
$O->log(str_repeat("-", 30));
$O->log("Server:");
$SRV = array_intersect_key($_SERVER, array_flip(array_filter(array_keys($_SERVER), 'server_request_var')));
echo '
' . "\nServer:\n";
echo '
' . "\n";
foreach($SRV AS $k => $v) {
if ($k == 'REQUEST_TIME')
$v = date('c', $v);
$O->log(sprintf(" %-20s => %s", $k, $v));
echo("- $k => $v
\n");
}
echo "
\n";
echo '
' . "\n";
echo date('c') . "
\n";
echo '
';
if ($exit)
die();
}
/**
* The settings below can be used to set additional paths to models, views and controllers.
* This is related to Ticket #470 (https://trac.cakephp.org/ticket/470)
*
* $modelPaths = array('full path to models', 'second full path to models', 'etc...');
* $viewPaths = array('this path to views', 'second full path to views', 'etc...');
* $controllerPaths = array('this path to controllers', 'second full path to controllers', 'etc...');
*
*/
//EOF
?>