Warning: Use of undefined constant DEVMODE - assumed 'DEVMODE' (this will throw an Error in a future version of PHP) in /home/httpd/vhosts/grabserberg.ch/iliasalt.grabserberg.ch/Services/Init/classes/class.ilErrorHandling.php on line 353 Warning: Use of undefined constant DEVMODE - assumed 'DEVMODE' (this will throw an Error in a future version of PHP) in /home/httpd/vhosts/grabserberg.ch/iliasalt.grabserberg.ch/Services/Init/classes/class.ilErrorHandling.php on line 353 Fatal error: Uncaught Whoops\Exception\ErrorException: Use of undefined constant ERROR_HANDLER - assumed 'ERROR_HANDLER' (this will throw an Error in a future version of PHP) in /home/httpd/vhosts/grabserberg.ch/iliasalt.grabserberg.ch/Services/Init/classes/class.ilErrorHandling.php:407 Stack trace: #0 /home/httpd/vhosts/grabserberg.ch/iliasalt.grabserberg.ch/Services/Init/classes/class.ilErrorHandling.php(480): Whoops\Run->handleError(2, 'Use of undefine...', '/home/httpd/vho...', 407) #1 /home/httpd/vhosts/grabserberg.ch/iliasalt.grabserberg.ch/Services/Init/classes/class.ilErrorHandling.php(407): ilErrorHandling->handlePreWhoops(2, 'Use of undefine...', '/home/httpd/vho...', 407, Array) #2 /home/httpd/vhosts/grabserberg.ch/iliasalt.grabserberg.ch/setup/classes/class.ilSetupErrorHandling.php(15): ilErrorHandling->devmodeHandler() #3 /home/httpd/vhosts/grabserberg.ch/iliasalt.grabserberg.ch/Services/Exceptions/classes/class.ilDelegatingHandler.php(48): ilSetupErrorHandling->getHandler() #4 /home/httpd/vhosts/grabserberg. in /home/httpd/vhosts/grabserberg.ch/iliasalt.grabserberg.ch/Services/Init/classes/class.ilErrorHandling.php on line 407 Warning: Use of undefined constant DEVMODE - assumed 'DEVMODE' (this will throw an Error in a future version of PHP) in /home/httpd/vhosts/grabserberg.ch/iliasalt.grabserberg.ch/Services/Init/classes/class.ilErrorHandling.php on line 353 Warning: Use of undefined constant ERROR_HANDLER - assumed 'ERROR_HANDLER' (this will throw an Error in a future version of PHP) in /home/httpd/vhosts/grabserberg.ch/iliasalt.grabserberg.ch/Services/Init/classes/class.ilErrorHandling.php on line 407
$message = "Error ".$file_name." occurred.";
if($logger->mail()) {
$message .= ' '.'Please send a mail to <a href="mailto:'.$logger->mail().'?subject=code: '.$file_name.'">'.$logger->mail().'%s</a>';
}
}
ilUtil::sendFailure($message, true);
ilUtil::redirect("error.php");
});
}
/**
* Get the handler to be used in DEVMODE.
* @return Whoops\Handler
*/
protected function devmodeHandler() {
global $ilLog;
switch (ERROR_HANDLER) {
case "TESTING":
return new ilTestingHandler();
case "PLAIN_TEXT":
return new ilPlainTextHandler();
case "PRETTY_PAGE":
return new PrettyPageHandler();
default:
if ($ilLog) {
$ilLog->write("Unknown or undefined error handler '".ERROR_HANDLER."'. "
."Falling back to PrettyPageHandler.");
}
return new PrettyPageHandler();
}
}
/**
* Get the handler to be used to log errors.
* @return Whoops\Handler
*/
protected function loggingHandler() {
$message = "Error ".$file_name." occurred.";
if($logger->mail()) {
$message .= ' '.'Please send a mail to <a href="mailto:'.$logger->mail().'?subject=code: '.$file_name.'">'.$logger->mail().'%s</a>';
}
}
ilUtil::sendFailure($message, true);
ilUtil::redirect("error.php");
});
}
/**
* Get the handler to be used in DEVMODE.
* @return Whoops\Handler
*/
protected function devmodeHandler() {
global $ilLog;
switch (ERROR_HANDLER) {
case "TESTING":
return new ilTestingHandler();
case "PLAIN_TEXT":
return new ilPlainTextHandler();
case "PRETTY_PAGE":
return new PrettyPageHandler();
default:
if ($ilLog) {
$ilLog->write("Unknown or undefined error handler '".ERROR_HANDLER."'. "
."Falling back to PrettyPageHandler.");
}
return new PrettyPageHandler();
}
}
/**
* Get the handler to be used to log errors.
* @return Whoops\Handler
*/
protected function loggingHandler() {
<?php
require_once 'Services/Init/classes/class.ilErrorHandling.php';
/**
* @inheritdoc
*/
class ilSetupErrorHandling extends ilErrorHandling {
/**
* @inheritdoc
*/
public function getHandler() {
global $ilLog;
if($ilLog) {
$ilLog->write("err");
}
return $this->devmodeHandler();
}
}
private $error_handling;
public function __construct(ilErrorHandling $error_handling) {
$this->error_handling = $error_handling;
}
/**
* Last missing method from HandlerInterface.
*
* Asks ilErrorHandling for the appropriate Handler and delegates it's tasks to
* that handler.
*
* @return int|null A handler may return nothing, or a Handler::HANDLE_* constant
*/
public function handle() {
if (defined("IL_INITIAL_WD"))
{
chdir(IL_INITIAL_WD);
}
$handler = $this->error_handling->getHandler();
$handler->setRun($this->getRun());
$handler->setException($this->getException());
$handler->setInspector($this->getInspector());
$handler->handle();
}
}
?>
// Capture output produced while handling the exception,
// we might want to send it straight away to the client,
// or return it silently.
$this->system->startOutputBuffering();
// Just in case there are no handlers:
$handlerResponse = null;
$handlerContentType = null;
foreach (array_reverse($this->handlerStack) as $handler) {
$handler->setRun($this);
$handler->setInspector($inspector);
$handler->setException($exception);
// The HandlerInterface does not require an Exception passed to handle()
// and neither of our bundled handlers use it.
// However, 3rd party handlers may have already relied on this parameter,
// and removing it would be possibly breaking for users.
$handlerResponse = $handler->handle($exception);
// Collect the content type for possible sending in the headers.
$handlerContentType = method_exists($handler, 'contentType') ? $handler->contentType() : null;
if (in_array($handlerResponse, [Handler::LAST_HANDLER, Handler::QUIT])) {
// The Handler has handled the exception in some way, and
// wishes to quit execution (Handler::QUIT), or skip any
// other handlers (Handler::LAST_HANDLER). If $this->allowQuit
// is false, Handler::QUIT behaves like Handler::LAST_HANDLER
break;
}
}
$willQuit = $handlerResponse == Handler::QUIT && $this->allowQuit();
$output = $this->system->cleanOutputBuffer();
// If we're allowed to, send output generated by handlers directly
// to the output, otherwise, and if the script doesn't quit, return
// it so that it may be used by the caller
public function handleError($level, $message, $file = null, $line = null)
{
if ($level & $this->system->getErrorReportingLevel()) {
foreach ($this->silencedPatterns as $entry) {
$pathMatches = (bool) preg_match($entry["pattern"], $file);
$levelMatches = $level & $entry["levels"];
if ($pathMatches && $levelMatches) {
// Ignore the error, abort handling
// See https://github.com/filp/whoops/issues/418
return true;
}
}
// XXX we pass $level for the "code" param only for BC reasons.
// see https://github.com/filp/whoops/issues/267
$exception = new ErrorException($message, /*code*/ $level, /*severity*/ $level, $file, $line);
if ($this->canThrowExceptions) {
throw $exception;
} else {
$this->handleException($exception);
}
// Do not propagate errors which were already handled by Whoops.
return true;
}
// Propagate error to the next handler, allows error_get_last() to
// work on silenced errors.
return false;
}
/**
* Special case to deal with Fatal errors and the like.
*/
public function handleShutdown()
{
// If we reached this step, we are in shutdown handler.
// An exception thrown in a shutdown handler will not be propagated
// to the exception handler. Pass that information along.
$this->canThrowExceptions = false;
/**
* Special case to deal with Fatal errors and the like.
*/
public function handleShutdown()
{
// If we reached this step, we are in shutdown handler.
// An exception thrown in a shutdown handler will not be propagated
// to the exception handler. Pass that information along.
$this->canThrowExceptions = false;
$error = $this->system->getLastError();
if ($error && Misc::isLevelFatal($error['type'])) {
// If there was a fatal error,
// it was not handled in handleError yet.
$this->handleError(
$error['type'],
$error['message'],
$error['file'],
$error['line']
);
}
}
/**
* In certain scenarios, like in shutdown handler, we can not throw exceptions
* @var bool
*/
private $canThrowExceptions = true;
/**
* Echo something to the browser
* @param string $output
* @return $this
*/
private function writeToOutputNow($output)
{
if ($this->sendHttpCode() && \Whoops\Util\Misc::canSendHeaders()) {
$this->system->setHttpResponseCode(
$this->sendHttpCode()
| Key | Value |
| SESSID | 318da5677870aafe996331da26e43f98 |
| Key | Value |
| lang |
| Key | Value |
| PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin |
| PP_CUSTOM_PHP_INI | /home/httpd/vhosts/system/iliasalt.grabserberg.ch/etc/php.ini |
| PP_CUSTOM_PHP_CGI_INDEX | fastcgi |
| SCRIPT_NAME | /setup/setup.php |
| REQUEST_URI | /setup/setup.php? |
| QUERY_STRING | |
| REQUEST_METHOD | GET |
| SERVER_PROTOCOL | HTTP/1.0 |
| GATEWAY_INTERFACE | CGI/1.1 |
| REMOTE_PORT | 3612 |
| SCRIPT_FILENAME | /home/httpd/vhosts/grabserberg.ch/iliasalt.grabserberg.ch/setup/setup.php |
| SERVER_ADMIN | root@localhost |
| CONTEXT_DOCUMENT_ROOT | /home/httpd/vhosts/grabserberg.ch/iliasalt.grabserberg.ch |
| CONTEXT_PREFIX | |
| REQUEST_SCHEME | https |
| DOCUMENT_ROOT | /home/httpd/vhosts/grabserberg.ch/iliasalt.grabserberg.ch |
| REMOTE_ADDR | 216.73.216.49 |
| SERVER_PORT | 443 |
| SERVER_ADDR | 80.74.138.63 |
| SERVER_NAME | iliasalt.grabserberg.ch |
| SERVER_SOFTWARE | Apache |
| SERVER_SIGNATURE | |
| HTTP_COOKIE | SESSID=318da5677870aafe996331da26e43f98 |
| HTTP_REFERER | https://iliasalt.grabserberg.ch/setup/setup.php |
| HTTP_ACCEPT_ENCODING | gzip, br, zstd, deflate |
| HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
| HTTP_ACCEPT | */* |
| HTTP_CONNECTION | close |
| HTTP_X_ACCEL_INTERNAL | /internal-nginx-static-location |
| HTTP_X_REAL_IP | 216.73.216.49 |
| HTTP_HOST | iliasalt.grabserberg.ch |
| HTTPS | on |
| PERL5LIB | /usr/share/awstats/lib:/usr/share/awstats/plugins |
| UNIQUE_ID | aTdooxAZ6ZOFWcUDAVA8HgAAACg |
| FCGI_ROLE | RESPONDER |
| PHP_SELF | /setup/setup.php |
| REQUEST_TIME_FLOAT | 1765238947.9791 |
| REQUEST_TIME | 1765238947 |
$message = "Error ".$file_name." occurred.";
if($logger->mail()) {
$message .= ' '.'Please send a mail to <a href="mailto:'.$logger->mail().'?subject=code: '.$file_name.'">'.$logger->mail().'%s</a>';
}
}
ilUtil::sendFailure($message, true);
ilUtil::redirect("error.php");
});
}
/**
* Get the handler to be used in DEVMODE.
* @return Whoops\Handler
*/
protected function devmodeHandler() {
global $ilLog;
switch (ERROR_HANDLER) {
case "TESTING":
return new ilTestingHandler();
case "PLAIN_TEXT":
return new ilPlainTextHandler();
case "PRETTY_PAGE":
return new PrettyPageHandler();
default:
if ($ilLog) {
$ilLog->write("Unknown or undefined error handler '".ERROR_HANDLER."'. "
."Falling back to PrettyPageHandler.");
}
return new PrettyPageHandler();
}
}
/**
* Get the handler to be used to log errors.
* @return Whoops\Handler
*/
protected function loggingHandler() {
$message = "Error ".$file_name." occurred.";
if($logger->mail()) {
$message .= ' '.'Please send a mail to <a href="mailto:'.$logger->mail().'?subject=code: '.$file_name.'">'.$logger->mail().'%s</a>';
}
}
ilUtil::sendFailure($message, true);
ilUtil::redirect("error.php");
});
}
/**
* Get the handler to be used in DEVMODE.
* @return Whoops\Handler
*/
protected function devmodeHandler() {
global $ilLog;
switch (ERROR_HANDLER) {
case "TESTING":
return new ilTestingHandler();
case "PLAIN_TEXT":
return new ilPlainTextHandler();
case "PRETTY_PAGE":
return new PrettyPageHandler();
default:
if ($ilLog) {
$ilLog->write("Unknown or undefined error handler '".ERROR_HANDLER."'. "
."Falling back to PrettyPageHandler.");
}
return new PrettyPageHandler();
}
}
/**
* Get the handler to be used to log errors.
* @return Whoops\Handler
*/
protected function loggingHandler() {
<?php
require_once 'Services/Init/classes/class.ilErrorHandling.php';
/**
* @inheritdoc
*/
class ilSetupErrorHandling extends ilErrorHandling {
/**
* @inheritdoc
*/
public function getHandler() {
global $ilLog;
if($ilLog) {
$ilLog->write("err");
}
return $this->devmodeHandler();
}
}
private $error_handling;
public function __construct(ilErrorHandling $error_handling) {
$this->error_handling = $error_handling;
}
/**
* Last missing method from HandlerInterface.
*
* Asks ilErrorHandling for the appropriate Handler and delegates it's tasks to
* that handler.
*
* @return int|null A handler may return nothing, or a Handler::HANDLE_* constant
*/
public function handle() {
if (defined("IL_INITIAL_WD"))
{
chdir(IL_INITIAL_WD);
}
$handler = $this->error_handling->getHandler();
$handler->setRun($this->getRun());
$handler->setException($this->getException());
$handler->setInspector($this->getInspector());
$handler->handle();
}
}
?>
// Capture output produced while handling the exception,
// we might want to send it straight away to the client,
// or return it silently.
$this->system->startOutputBuffering();
// Just in case there are no handlers:
$handlerResponse = null;
$handlerContentType = null;
foreach (array_reverse($this->handlerStack) as $handler) {
$handler->setRun($this);
$handler->setInspector($inspector);
$handler->setException($exception);
// The HandlerInterface does not require an Exception passed to handle()
// and neither of our bundled handlers use it.
// However, 3rd party handlers may have already relied on this parameter,
// and removing it would be possibly breaking for users.
$handlerResponse = $handler->handle($exception);
// Collect the content type for possible sending in the headers.
$handlerContentType = method_exists($handler, 'contentType') ? $handler->contentType() : null;
if (in_array($handlerResponse, [Handler::LAST_HANDLER, Handler::QUIT])) {
// The Handler has handled the exception in some way, and
// wishes to quit execution (Handler::QUIT), or skip any
// other handlers (Handler::LAST_HANDLER). If $this->allowQuit
// is false, Handler::QUIT behaves like Handler::LAST_HANDLER
break;
}
}
$willQuit = $handlerResponse == Handler::QUIT && $this->allowQuit();
$output = $this->system->cleanOutputBuffer();
// If we're allowed to, send output generated by handlers directly
// to the output, otherwise, and if the script doesn't quit, return
// it so that it may be used by the caller
public function handleError($level, $message, $file = null, $line = null)
{
if ($level & $this->system->getErrorReportingLevel()) {
foreach ($this->silencedPatterns as $entry) {
$pathMatches = (bool) preg_match($entry["pattern"], $file);
$levelMatches = $level & $entry["levels"];
if ($pathMatches && $levelMatches) {
// Ignore the error, abort handling
// See https://github.com/filp/whoops/issues/418
return true;
}
}
// XXX we pass $level for the "code" param only for BC reasons.
// see https://github.com/filp/whoops/issues/267
$exception = new ErrorException($message, /*code*/ $level, /*severity*/ $level, $file, $line);
if ($this->canThrowExceptions) {
throw $exception;
} else {
$this->handleException($exception);
}
// Do not propagate errors which were already handled by Whoops.
return true;
}
// Propagate error to the next handler, allows error_get_last() to
// work on silenced errors.
return false;
}
/**
* Special case to deal with Fatal errors and the like.
*/
public function handleShutdown()
{
// If we reached this step, we are in shutdown handler.
// An exception thrown in a shutdown handler will not be propagated
// to the exception handler. Pass that information along.
$this->canThrowExceptions = false;
/**
* Special case to deal with Fatal errors and the like.
*/
public function handleShutdown()
{
// If we reached this step, we are in shutdown handler.
// An exception thrown in a shutdown handler will not be propagated
// to the exception handler. Pass that information along.
$this->canThrowExceptions = false;
$error = $this->system->getLastError();
if ($error && Misc::isLevelFatal($error['type'])) {
// If there was a fatal error,
// it was not handled in handleError yet.
$this->handleError(
$error['type'],
$error['message'],
$error['file'],
$error['line']
);
}
}
/**
* In certain scenarios, like in shutdown handler, we can not throw exceptions
* @var bool
*/
private $canThrowExceptions = true;
/**
* Echo something to the browser
* @param string $output
* @return $this
*/
private function writeToOutputNow($output)
{
if ($this->sendHttpCode() && \Whoops\Util\Misc::canSendHeaders()) {
$this->system->setHttpResponseCode(
$this->sendHttpCode()
| Key | Value |
| SESSID | 318da5677870aafe996331da26e43f98 |
| Key | Value |
| lang |
| Key | Value |
| PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin |
| PP_CUSTOM_PHP_INI | /home/httpd/vhosts/system/iliasalt.grabserberg.ch/etc/php.ini |
| PP_CUSTOM_PHP_CGI_INDEX | fastcgi |
| SCRIPT_NAME | /setup/setup.php |
| REQUEST_URI | /setup/setup.php? |
| QUERY_STRING | |
| REQUEST_METHOD | GET |
| SERVER_PROTOCOL | HTTP/1.0 |
| GATEWAY_INTERFACE | CGI/1.1 |
| REMOTE_PORT | 3612 |
| SCRIPT_FILENAME | /home/httpd/vhosts/grabserberg.ch/iliasalt.grabserberg.ch/setup/setup.php |
| SERVER_ADMIN | root@localhost |
| CONTEXT_DOCUMENT_ROOT | /home/httpd/vhosts/grabserberg.ch/iliasalt.grabserberg.ch |
| CONTEXT_PREFIX | |
| REQUEST_SCHEME | https |
| DOCUMENT_ROOT | /home/httpd/vhosts/grabserberg.ch/iliasalt.grabserberg.ch |
| REMOTE_ADDR | 216.73.216.49 |
| SERVER_PORT | 443 |
| SERVER_ADDR | 80.74.138.63 |
| SERVER_NAME | iliasalt.grabserberg.ch |
| SERVER_SOFTWARE | Apache |
| SERVER_SIGNATURE | |
| HTTP_COOKIE | SESSID=318da5677870aafe996331da26e43f98 |
| HTTP_REFERER | https://iliasalt.grabserberg.ch/setup/setup.php |
| HTTP_ACCEPT_ENCODING | gzip, br, zstd, deflate |
| HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
| HTTP_ACCEPT | */* |
| HTTP_CONNECTION | close |
| HTTP_X_ACCEL_INTERNAL | /internal-nginx-static-location |
| HTTP_X_REAL_IP | 216.73.216.49 |
| HTTP_HOST | iliasalt.grabserberg.ch |
| HTTPS | on |
| PERL5LIB | /usr/share/awstats/lib:/usr/share/awstats/plugins |
| UNIQUE_ID | aTdooxAZ6ZOFWcUDAVA8HgAAACg |
| FCGI_ROLE | RESPONDER |
| PHP_SELF | /setup/setup.php |
| REQUEST_TIME_FLOAT | 1765238947.9791 |
| REQUEST_TIME | 1765238947 |