Warning: preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0 in /var/www/html/i2782ve.com/grav-admin/system/defines.php on line 95
Crikey! There was an error...
Grav \ Framework \ Session \ Exceptions \ SessionException (500)
Failed to start session: session_start(): Session cannot be started after headers have already been sent (sent from /var/www/html/i2782ve.com/grav-admin/system/defines.php on line 95) Grav\Framework\Session\Exceptions\SessionException thrown with message "Failed to start session: session_start(): Session cannot be started after headers have already been sent (sent from /var/www/html/i2782ve.com/grav-admin/system/defines.php on line 95)" Stacktrace: #10 Grav\Framework\Session\Exceptions\SessionException in /var/www/html/i2782ve.com/grav-admin/system/src/Grav/Framework/Session/Session.php:251 #9 Grav\Framework\Session\Session:start in /var/www/html/i2782ve.com/grav-admin/system/src/Grav/Common/Session.php:57 #8 Grav\Common\Session:init in /var/www/html/i2782ve.com/grav-admin/system/src/Grav/Common/Processors/InitializeProcessor.php:558 #7 Grav\Common\Processors\InitializeProcessor:initializeSession in /var/www/html/i2782ve.com/grav-admin/system/src/Grav/Common/Processors/InitializeProcessor.php:111 #6 Grav\Common\Processors\InitializeProcessor:process in /var/www/html/i2782ve.com/grav-admin/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #5 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/html/i2782ve.com/grav-admin/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #4 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/html/i2782ve.com/grav-admin/system/src/Grav/Framework/RequestHandler/Middlewares/MultipartRequestSupport.php:40 #3 Grav\Framework\RequestHandler\Middlewares\MultipartRequestSupport:process in /var/www/html/i2782ve.com/grav-admin/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #2 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/html/i2782ve.com/grav-admin/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #1 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/html/i2782ve.com/grav-admin/system/src/Grav/Common/Grav.php:307 #0 Grav\Common\Grav:process in /var/www/html/i2782ve.com/grav-admin/index.php:134
Stack frames (11)
10
Grav\Framework\Session\Exceptions\SessionException
…/system/src/Grav/Framework/Session/Session.php:251
9
Grav\Framework\Session\Session start
…/system/src/Grav/Common/Session.php:57
8
Grav\Common\Session init
…/system/src/Grav/Common/Processors/InitializeProcessor.php:558
7
Grav\Common\Processors\InitializeProcessor initializeSession
…/system/src/Grav/Common/Processors/InitializeProcessor.php:111
6
Grav\Common\Processors\InitializeProcessor process
…/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50
5
Grav\Framework\RequestHandler\RequestHandler handle
…/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62
4
Grav\Framework\RequestHandler\RequestHandler handle
…/system/src/Grav/Framework/RequestHandler/Middlewares/MultipartRequestSupport.php:40
3
Grav\Framework\RequestHandler\Middlewares\MultipartRequestSupport process
…/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50
2
Grav\Framework\RequestHandler\RequestHandler handle
…/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62
1
Grav\Framework\RequestHandler\RequestHandler handle
…/system/src/Grav/Common/Grav.php:307
0
Grav\Common\Grav process
…/index.php:134
/var/www/html/i2782ve.com/grav-admin/system/src/Grav/Framework/Session/Session.php
                // Start session with new session id.
                $useStrictMode = $options['use_strict_mode'] ?? 0;
                if ($useStrictMode) {
                    ini_set('session.use_strict_mode', '0');
                }
                session_id($newId);
                if ($useStrictMode) {
                    ini_set('session.use_strict_mode', '1');
                }
 
                $success = @session_start($options);
                if (!$success) {
                    $last = error_get_last();
                    $error = $last ? $last['message'] : 'Unknown error';
 
                    throw new RuntimeException($error);
                }
            }
        } catch (Exception $e) {
            throw new SessionException('Failed to start session: ' . $e->getMessage(), 500);
        }
 
        $this->started = true;
        $this->onSessionStart();
 
        try {
            $user = $this->__get('user');
            if ($user && (!$user instanceof UserInterface || (method_exists($user, 'isValid') && !$user->isValid()))) {
                throw new RuntimeException('Bad user');
            }
        } catch (Throwable) {
            $this->invalidate();
            throw new SessionException('Invalid User object, session destroyed.', 500);
        }
 
 
        // Extend the lifetime of the session.
        if ($sessionExists) {
            $this->setCookie();
        }
Arguments
  1. "Failed to start session: session_start(): Session cannot be started after headers have already been sent (sent from /var/www/html/i2782ve.com/grav-admin/system/defines.php on line 95)"
    
/var/www/html/i2782ve.com/grav-admin/system/src/Grav/Common/Session.php
 
    /**
     * Initialize session.
     *
     * Code in this function has been moved into SessionServiceProvider class.
     *
     * @return void
     */
    public function init()
    {
        if ($this->autoStart && !$this->isStarted()) {
            // Opt-in: start the session read-only so its exclusive lock is
            // released right after the initial read. The first write transparently
            // re-acquires it. Lets requests sharing a session id run concurrently
            // instead of serializing on the lock (e.g. the SPA admin's parallel
            // API calls). Default off — read-modify-write across the request is no
            // longer atomic, which is fine for typical session use but is a
            // behaviour change, so it stays opt-in.
            $readonly = (bool) Grav::instance()['config']->get('system.session.read_and_close', false);
            $this->start($readonly);
 
            $this->autoStart = false;
        }
    }
 
    /**
     * @param bool $auto
     * @return $this
     */
    public function setAutoStart($auto)
    {
        $this->autoStart = (bool)$auto;
 
        return $this;
    }
 
    /**
     * Returns attributes.
     *
     * @return array Attributes
Arguments
  1. false
    
/var/www/html/i2782ve.com/grav-admin/system/src/Grav/Common/Processors/InitializeProcessor.php
 
        return $value;
    }
 
    /**
     * @param Config $config
     */
    protected function initializeSession(Config $config): void
    {
        // FIXME: Initialize session should happen later after plugins have been loaded. This is a workaround to fix session issues in AWS.
        if (isset($this->container['session']) && $config->get('system.session.initialize', true)) {
            $this->startTimer('_init_session', 'Start Session');
 
            /** @var Session $session */
            $session = $this->container['session'];
 
            try {
                $session->init();
            } catch (SessionException) {
                $session->init();
                $message = 'Session corruption detected, restarting session...';
                $this->addMessage($message);
                $this->container['messages']->add($message, 'error');
            }
 
            $this->stopTimer('_init_session');
        }
    }
}
 
/var/www/html/i2782ve.com/grav-admin/system/src/Grav/Common/Processors/InitializeProcessor.php
        }
 
        // Initialize output buffering.
        $this->initializeOutputBuffering($config);
 
        // Set timezone, locale.
        $this->initializeLocale($config);
 
        // Load plugins.
        $this->initializePlugins();
 
        // Load pages.
        $this->initializePages($config);
 
        // Load accounts (decides class to be used).
        // TODO: remove in 2.0.
        $this->container['accounts'];
 
        // Initialize session (used by URI, see issue #3269).
        $this->initializeSession($config);
 
        // Initialize URI (uses session, see issue #3269).
        $this->initializeUri($config);
 
        // Grav may return redirect response right away.
        $redirectCode = (int)$config->get('system.pages.redirect_trailing_slash', 1);
        if ($redirectCode) {
            $response = $this->handleRedirectRequest($request, $redirectCode > 300 ? $redirectCode : null);
            if ($response) {
                $this->stopTimer('_init');
 
                return $response;
            }
        }
 
        $this->stopTimer('_init');
 
        // Wrap call to next handler so that debugger can profile it.
        /** @var Response $response */
        $response = $debugger->profile(static fn() => $handler->handle($request));
Arguments
  1. Grav\Common\Config\Config {#93}
    
/var/www/html/i2782ve.com/grav-admin/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    protected $handler;
 
    /** @var ContainerInterface|null */
    protected $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
Arguments
  1. Nyholm\Psr7\ServerRequest {#66}
    
  2. Grav\Framework\RequestHandler\RequestHandler {#90}
    
/var/www/html/i2782ve.com/grav-admin/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
Arguments
  1. Nyholm\Psr7\ServerRequest {#66}
    
/var/www/html/i2782ve.com/grav-admin/system/src/Grav/Framework/RequestHandler/Middlewares/MultipartRequestSupport.php
use function in_array;
use function is_array;
use function strlen;
 
/**
 * Multipart request support for PUT and PATCH.
 */
class MultipartRequestSupport implements MiddlewareInterface
{
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $contentType = $request->getHeaderLine('content-type');
        $method = $request->getMethod();
        if (!str_starts_with($contentType, 'multipart/form-data') || !in_array($method, ['PUT', 'PATCH'], true)) {
            return $handler->handle($request);
        }
 
        $boundary = explode('; boundary=', $contentType, 2)[1] ?? '';
        $parts = explode("--{$boundary}", $request->getBody()->getContents());
        $parts = array_slice($parts, 1, count($parts) - 2);
 
        $params = [];
        $files = [];
        foreach ($parts as $part) {
            $this->processPart($params, $files, $part);
        }
 
        return $handler->handle($request->withParsedBody($params)->withUploadedFiles($files));
    }
 
    /**
     * @param array $params
     * @param array $files
     * @param string $part
     * @return void
Arguments
  1. Nyholm\Psr7\ServerRequest {#66}
    
/var/www/html/i2782ve.com/grav-admin/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    protected $handler;
 
    /** @var ContainerInterface|null */
    protected $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
Arguments
  1. Nyholm\Psr7\ServerRequest {#66}
    
  2. Grav\Framework\RequestHandler\RequestHandler {#88}
    
/var/www/html/i2782ve.com/grav-admin/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
Arguments
  1. Nyholm\Psr7\ServerRequest {#66}
    
/var/www/html/i2782ve.com/grav-admin/system/src/Grav/Common/Grav.php
                'initializeProcessor' => fn() => new InitializeProcessor($this),
                'backupsProcessor' => fn() => new BackupsProcessor($this),
                'pluginsProcessor' => fn() => new PluginsProcessor($this),
                'themesProcessor' => fn() => new ThemesProcessor($this),
                'schedulerProcessor' => fn() => new SchedulerProcessor($this),
                'requestProcessor' => fn() => new RequestProcessor($this),
                'tasksProcessor' => fn() => new TasksProcessor($this),
                'assetsProcessor' => fn() => new AssetsProcessor($this),
                'twigProcessor' => fn() => new TwigProcessor($this),
                'pagesProcessor' => fn() => new PagesProcessor($this),
                'debuggerAssetsProcessor' => fn() => new DebuggerAssetsProcessor($this),
                'renderProcessor' => fn() => new RenderProcessor($this),
            ]
        );
 
        $default = static fn() => new Response(404, ['Expires' => 0, 'Cache-Control' => 'no-store, max-age=0'], 'Not Found');
 
        $collection = new RequestHandler($this->middleware, $default, $container);
 
        $response = $collection->handle($this['request']);
        $body = $response->getBody();
 
        /** @var Messages $messages */
        $messages = $this['messages'];
 
        // Prevent caching if session messages were displayed in the page.
        $noCache = $messages->isCleared();
        if ($noCache) {
            $response = $response->withHeader('Cache-Control', 'no-store, max-age=0');
        }
 
        // Handle ETag and If-None-Match headers.
        if ($response->getHeaderLine('ETag') === '1') {
            $etag = md5($body);
            $response = $response->withHeader('ETag', '"' . $etag . '"');
 
            $search = trim((string) $this['request']->getHeaderLine('If-None-Match'), '"');
            if ($noCache === false && $search === $etag) {
                $response = $response->withStatus(304);
                $body = '';
Arguments
  1. Nyholm\Psr7\ServerRequest {#66}
    
/var/www/html/i2782ve.com/grav-admin/index.php
 
// Register the auto-loader.
$loader = require $autoload;
 
// Set timezone to default, falls back to system if php.ini not set
date_default_timezone_set(@date_default_timezone_get());
 
// Set internal encoding.
@ini_set('default_charset', 'UTF-8');
mb_internal_encoding('UTF-8');
 
use Grav\Common\Grav;
use RocketTheme\Toolbox\Event\Event;
 
// Get the Grav instance
$grav = Grav::instance(['loader' => $loader]);
 
// Process the page
try {
    $grav->process();
} catch (\Error|\Exception $e) {
    $grav->fireEvent('onFatalException', new Event(['exception' => $e]));
 
    throw $e;
}
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
REDIRECT_STATUS
"200"
HTTP_HOST
"www.i2782ve.com"
HTTP_USER_AGENT
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
HTTP_ACCEPT
"*/*"
HTTP_ACCEPT_ENCODING
"gzip, br, zstd, deflate"
HTTP_X_FORWARDED_FOR
"216.73.216.168"
HTTP_X_FORWARDED_HOST
"www.i2782ve.com"
HTTP_X_FORWARDED_PROTO
"https"
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin"
SERVER_SIGNATURE
"<address>Apache/2.4.66 (Ubuntu) Server at www.i2782ve.com Port 80</address>\n"
SERVER_SOFTWARE
"Apache/2.4.66 (Ubuntu)"
SERVER_NAME
"www.i2782ve.com"
SERVER_ADDR
"127.0.0.1"
SERVER_PORT
"80"
REMOTE_ADDR
"127.0.0.1"
DOCUMENT_ROOT
"/var/www/html/i2782ve.com/grav-admin/"
REQUEST_SCHEME
"http"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"/var/www/html/i2782ve.com/grav-admin/"
SERVER_ADMIN
"info@green-brain.it"
SCRIPT_FILENAME
"/var/www/html/i2782ve.com/grav-admin/index.php"
REMOTE_PORT
"55152"
REDIRECT_URL
"/sitemap.xml"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.1"
REQUEST_METHOD
"GET"
QUERY_STRING
""
REQUEST_URI
"/sitemap.xml"
SCRIPT_NAME
"/index.php"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1793013026.8822
REQUEST_TIME
1793013026
argv
[]
argc
0
Key Value
USER
"root"
APACHE_RUN_DIR
"/run/apache2"
SYSTEMD_EXEC_PID
"60276"
NOTIFY_SOCKET
"/run/systemd/notify"
APACHE_PID_FILE
"/run/apache2/apache2.pid"
JOURNAL_STREAM
"10:955638"
MEMORY_PRESSURE_WATCH
"/sys/fs/cgroup/system.slice/apache2.service/memory.pressure"
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin"
INVOCATION_ID
"f3c407f68a164dc0a20e37816326500d"
APACHE_LOCK_DIR
"/run/lock/apache2"
LANG
"C.UTF-8"
APACHE_RUN_USER
"www-data"
APACHE_RUN_GROUP
"www-data"
APACHE_LOG_DIR
"/var/log/apache2"
PWD
"/"
MEMORY_PRESSURE_WRITE
"c29tZSAyMDAwMDAgMjAwMDAwMAA="
0. Whoops\Handler\PrettyPageHandler
1. Whoops\Handler\CallbackHandler