"session_write_close(): Write failed: No space left on device (28)"
}
$logging = !empty($config['log']);
$whoops = null;
$factory = function () use (&$whoops, $verbosity, $logging, $jsonRequest) {
return $whoops ??= $this->createWhoops($verbosity, $logging, $jsonRequest);
};
set_exception_handler(static function ($exception) use ($factory) {
$factory()->handleException($exception);
});
set_error_handler(static function ($level, $message, $file = '', $line = 0) use ($factory) {
if (!($level & error_reporting())) {
// Mirrors Whoops\Run::handleError(): leave silenced errors to PHP.
return false;
}
return $factory()->handleError($level, $message, $file, $line);
});
register_shutdown_function(static function () use ($factory) {
$error = error_get_last();
if ($error === null) {
return;
}
// Same fatal set Whoops handles at shutdown (Misc::isLevelFatal), minus the
// core warnings/errors Grav's SystemFacade has always ignored there.
if ($error['type'] & (E_ERROR | E_PARSE | E_COMPILE_ERROR | E_COMPILE_WARNING)) {
$whoops = $factory();
// An exception thrown in a shutdown handler will not propagate to the
// exception handler, so render it directly like Whoops::handleShutdown does.
$whoops->allowQuit(false);
$whoops->handleException(new ErrorException($error['message'], $error['type'], $error['type'], $error['file'], $error['line']));
}
});
// Re-register deprecation handler.
*/
public function setErrorHandler()
{
$this->errorHandler = set_error_handler(
$this->deprecatedErrorHandler(...)
);
}
/**
* @param int $errno
* @param string $errstr
* @param string $errfile
* @param int $errline
* @return bool
*/
public function deprecatedErrorHandler($errno, $errstr, $errfile, $errline)
{
if ($errno !== E_USER_DEPRECATED && $errno !== E_DEPRECATED) {
if ($this->errorHandler) {
return call_user_func($this->errorHandler, $errno, $errstr, $errfile, $errline);
}
return true;
}
if (!$this->enabled) {
return true;
}
// Figure out error scope from the error.
$scope = 'unknown';
if (stripos($errstr, 'grav') !== false) {
$scope = 'grav';
} elseif (str_contains($errfile, '/twig/')) {
$scope = 'twig';
// TODO: remove when upgrading to Twig 2+
if (str_contains($errstr, '#[\ReturnTypeWillChange]') || str_contains($errstr, 'Passing null to parameter')) {
return true;
}
} elseif (stripos($errfile, '/yaml/') !== false) {
| Key | Value |
| redirect_after_login | null
|
| user | Grav\Common\User\User {#543} |
| messages | Grav\Framework\Session\Messages {#84} |
| Key | Value |
| TEMP | "/home/zarlo/tmp"
|
| TMPDIR | "/home/zarlo/tmp"
|
| TMP | "/home/zarlo/tmp"
|
| PATH | "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
|
| HOSTNAME | "" |
| USER | "zarlo"
|
| HOME | "/home/zarlo"
|
| SCRIPT_NAME | "/index.php"
|
| REQUEST_URI | "/sitemap.xml"
|
| QUERY_STRING | "" |
| REQUEST_METHOD | "GET"
|
| SERVER_PROTOCOL | "HTTP/1.1"
|
| GATEWAY_INTERFACE | "CGI/1.1"
|
| REDIRECT_URL | "/sitemap.xml"
|
| REMOTE_PORT | "45024"
|
| SCRIPT_FILENAME | "/home/zarlo/web/kaleb.au/public_html/index.php"
|
| SERVER_ADMIN | "info@kaleb.au"
|
| CONTEXT_DOCUMENT_ROOT | "/home/zarlo/web/kaleb.au/public_html"
|
| CONTEXT_PREFIX | "" |
| REQUEST_SCHEME | "https"
|
| DOCUMENT_ROOT | "/home/zarlo/web/kaleb.au/public_html"
|
| REMOTE_ADDR | "216.73.217.62"
|
| SERVER_PORT | "443"
|
| SERVER_ADDR | "15.235.106.83"
|
| SERVER_NAME | "kaleb.au"
|
| SERVER_SOFTWARE | "Apache/2.4.58 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/3.0.13"
|
| SERVER_SIGNATURE | "" |
| 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_X_FORWARDED_FOR | "216.73.217.62"
|
| HTTP_HOST | "kaleb.au"
|
| proxy-nokeepalive | "1"
|
| SSL_TLS_SNI | "kaleb.au"
|
| HTTPS | "on"
|
| REDIRECT_STATUS | "200"
|
| REDIRECT_SSL_TLS_SNI | "kaleb.au"
|
| REDIRECT_HTTPS | "on"
|
| FCGI_ROLE | "RESPONDER"
|
| PHP_SELF | "/index.php"
|
| REQUEST_TIME_FLOAT | 1793389158.5479
|
| REQUEST_TIME | 1793389158
|
| argv | [] |
| argc | 0
|
| GRAV_ENVIRONMENT | "production"
|
| GRAV_CONFIG | "true"
|
| GRAV_CONFIG__system__cache__enabled | "true"
|
| SYMFONY_DOTENV_VARS | "GRAV_ENVIRONMENT,GRAV_CONFIG,GRAV_CONFIG__system__cache__enabled"
|
| Key | Value |
| GRAV_ENVIRONMENT | "production"
|
| GRAV_CONFIG | "true"
|
| GRAV_CONFIG__system__cache__enabled | "true"
|
| SYMFONY_DOTENV_VARS | "GRAV_ENVIRONMENT,GRAV_CONFIG,GRAV_CONFIG__system__cache__enabled"
|