Symfony Exception

ErrorException RuntimeError

HTTP 500 Internal Server Error

An exception has been thrown during the rendering of a template ("Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php/session) failed: Permission denied (13)") in @WebProfiler/Profiler/layout.html.twig at line 40.

Exceptions 2

Twig\Error\ RuntimeError

Show exception properties
Twig\Error\RuntimeError {#1511
  -lineno: 40
  -rawMessage: "An exception has been thrown during the rendering of a template ("Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php/session) failed: Permission denied (13)")."
  -source: Twig\Source {#1691
    -code: """
      {% extends '@WebProfiler/Profiler/base.html.twig' %}\n
      \n
      {% block body %}\n
          <div class="container">\n
              {{ include('@WebProfiler/Profiler/header.html.twig', {profile_type: profile_type}, with_context = false) }}\n
      \n
              <div id="summary">\n
              {% block summary %}\n
                  {% if profile is defined %}\n
                      {% set request_collector = profile.collectors.request|default(false) %}\n
      \n
                      {{ include('@WebProfiler/Profiler/_%s_summary.html.twig'|format(profile_type), {\n
                          profile: profile,\n
                          command_collector: profile.collectors.command|default(false) ,\n
                          request_collector: request_collector,\n
                          request: request,\n
                          token: token\n
                      }, with_context=false) }}\n
                  {% endif %}\n
              {% endblock %}\n
          </div>\n
      \n
              <div id="content">\n
                  <div id="main">\n
                      <div id="sidebar">\n
                          {% block sidebar %}\n
                              <div id="sidebar-contents">\n
                                  <div id="sidebar-shortcuts">\n
                                      {% block sidebar_shortcuts_links %}\n
                                          <div class="shortcuts">\n
                                              <a class="btn btn-link" href="{{ path('_profiler_search', { limit: 10, type: profile_type }) }}">Last 10</a>\n
                                              <a class="btn btn-link" href="{{ path('_profiler', { token: 'latest', type: profile_type }|merge(request.query.all)) }}">Latest</a>\n
      \n
                                              <a class="sf-toggle btn btn-link" data-toggle-selector="#sidebar-search" {% if tokens is defined or about is defined %}data-toggle-initial="display"{% endif %}>\n
                                                  {{ source('@WebProfiler/Icon/search.svg') }} <span class="hidden-small">Search</span>\n
                                              </a>\n
                                          </div>\n
                                      {% endblock sidebar_shortcuts_links %}\n
      \n
                                      {{ render(controller('web_profiler.controller.profiler::searchBarAction', query={type: profile_type }|merge(request.query.all))) }}\n
                                  </div>\n
      \n
                                  {% if templates is defined %}\n
                                      <ul id="menu-profiler">\n
                                          {% if 'request' is same as(profile_type) %}\n
                                              {% set excludes = ['command'] %}\n
                                          {% elseif 'command' is same as(profile_type) %}\n
                                              {% set excludes = ['request', 'router'] %}\n
                                          {% endif %}\n
      \n
                                          {% for name, template in templates|filter((t, n) => n not in excludes) %}\n
                                              {% set menu -%}\n
                                                  {%- if block('menu', template) is defined -%}\n
                                                      {% with { collector: profile.getcollector(name), profiler_markup_version: profiler_markup_version } %}\n
                                                          {{- block('menu', template) -}}\n
                                                      {% endwith %}\n
                                                  {%- endif -%}\n
                                              {%- endset %}\n
                                              {% if menu is not empty %}\n
                                                  <li class="{{ name }} {{ name == panel ? 'selected' }}">\n
                                                      <a href="{{ path('_profiler', { token: token, panel: name, type: profile_type }) }}">{{ menu|raw }}</a>\n
                                                  </li>\n
                                              {% endif %}\n
                                          {% endfor %}\n
                                      </ul>\n
                                  {% endif %}\n
                              </div>\n
      \n
                              {{ include('@WebProfiler/Profiler/settings.html.twig') }}\n
                          {% endblock sidebar %}\n
                      </div>\n
      \n
                      <div id="collector-wrapper">\n
                          <div id="collector-content">\n
                              {{ include('@WebProfiler/Profiler/base_js.html.twig') }}\n
                              {% block panel '' %}\n
                          </div>\n
                      </div>\n
                  </div>\n
              </div>\n
          </div>\n
      {% endblock %}\n
      """
    -name: "@WebProfiler/Profiler/layout.html.twig"
    -path: "/sites/test/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig"
  }
  -phpFile: "/var/www/vhosts/ohdev.ca/sites/test/vendor/twig/twig/src/Template.php"
  -phpLine: 460
}
Warning: file_exists(): open_basedir restriction in effect. File(/sites/test/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig) is not within the allowed path(s): (/var/www/vhosts/ohdev.ca/:/tmp/) (500 Internal Server Error)

Symfony Exception

Warning: file_exists(): open_basedir restriction in effect. File(/sites/test/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig) is not within the allowed path(s): (/var/www/vhosts/ohdev.ca/:/tmp/)

Exceptions 3

ErrorException

Show exception properties
ErrorException {#1288
  #severity: E_WARNING
}
  1.         if ($line) {
  2.             $text .= ' at line '.$line;
  3.         }
  4.         if (!file_exists($file)) {
  5.             return $text;
  6.         }
  7.         $link $this->fileLinkFormat->format($file$line);
  1.     <?php if ($trace['file']) { ?>
  2.         <?php
  3.         $lineNumber $trace['line'] ?: 1;
  4.         $fileLink $this->fileLinkFormat->format($trace['file'], $lineNumber);
  5.         $filePath strtr(strip_tags($this->formatFile($trace['file'], $lineNumber)), [' at line '.$lineNumber => '']);
  6.         $filePathParts explode(\DIRECTORY_SEPARATOR$filePath);
  7.         ?>
  8.         <span class="block trace-file-path">
  9.             in
  10.             <a href="<?= $fileLink?>">
  1.     private function include(string $name, array $context = []): string
  2.     {
  3.         extract($context\EXTR_SKIP);
  4.         ob_start();
  5.         include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name $name;
  6.         return trim(ob_get_clean());
  7.     }
  8.     /**
  1.             $displayCodeSnippet $isFirstUserCode && !$isVendorTrace;
  2.             if ($displayCodeSnippet) {
  3.                 $isFirstUserCode false;
  4.             } ?>
  5.             <div class="trace-line <?= $isVendorTrace 'trace-from-vendor' ''?>">
  6.                 <?= $this->include('views/trace.html.php', [
  7.                     'prefix' => $index,
  8.                     'i' => $i,
  9.                     'trace' => $trace,
  10.                     'style' => $isVendorTrace 'compact' : ($displayCodeSnippet 'expanded' ''),
  11.                 ]); ?>
  1.     private function include(string $name, array $context = []): string
  2.     {
  3.         extract($context\EXTR_SKIP);
  4.         ob_start();
  5.         include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name $name;
  6.         return trim(ob_get_clean());
  7.     }
  8.     /**
  1.             </h3>
  2.             <div class="tab-content">
  3.                 <?php
  4.                 foreach ($exceptionAsArray as $i => $e) {
  5.                     echo $this->include('views/traces.html.php', [
  6.                         'exception' => $e,
  7.                         'index' => $i 1,
  8.                         'expand' => in_array($i$exceptionWithUserCodetrue) || ([] === $exceptionWithUserCode && === $i),
  9.                     ]);
  10.                 }
  1.     private function include(string $name, array $context = []): string
  2.     {
  3.         extract($context\EXTR_SKIP);
  4.         ob_start();
  5.         include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name $name;
  6.         return trim(ob_get_clean());
  7.     }
  8.     /**
  1.                     </div>
  2.                 </div>
  3.             </header>
  4.         <?php ?>
  5.         <?= $this->include('views/exception.html.php'$context); ?>
  6.         <script>
  7.             <?= $this->include('assets/js/exception.js'); ?>
  8.         </script>
  9.     </body>
  1.     private function include(string $name, array $context = []): string
  2.     {
  3.         extract($context\EXTR_SKIP);
  4.         ob_start();
  5.         include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name $name;
  6.         return trim(ob_get_clean());
  7.     }
  8.     /**
  1.             ]);
  2.         }
  3.         $exceptionMessage $this->escape($exception->getMessage());
  4.         return $this->include($debugTemplate, [
  5.             'exception' => $exception,
  6.             'exceptionMessage' => $exceptionMessage,
  7.             'statusText' => $statusText,
  8.             'statusCode' => $statusCode,
  9.             'logger' => null !== $this->logger && class_exists(DebugLoggerConfigurator::class) ? DebugLoggerConfigurator::getDebugLogger($this->logger) : null,
  1.             $headers['X-Debug-Exception-File'] = rawurlencode($exception->getFile()).':'.$exception->getLine();
  2.         }
  3.         $exception FlattenException::createWithDataRepresentation($exceptionnull$headers);
  4.         return $exception->setAsString($this->renderException($exception));
  5.     }
  6.     /**
  7.      * Gets the HTML content associated with the given exception.
  8.      */
  1.     {
  2.         $flattenException FlattenException::createFromThrowable($exception);
  3.         $debug \is_bool($this->debug) ? $this->debug : ($this->debug)($flattenException);
  4.         if ($debug || !$template $this->findTemplate($flattenException->getStatusCode())) {
  5.             return $this->fallbackErrorRenderer->render($exception);
  6.         }
  7.         return $flattenException->setAsString($this->twig->render($template, [
  8.             'exception' => $flattenException,
  9.             'status_code' => $flattenException->getStatusCode(),
  1.             $flattenException->setAsString($this->serializer->serialize($flattenException$format, [
  2.                 'exception' => $exception,
  3.                 'debug' => $debug,
  4.             ]));
  5.         } catch (NotEncodableValueException) {
  6.             $flattenException $this->fallbackErrorRenderer->render($exception);
  7.         }
  8.         return $flattenException->setHeaders($flattenException->getHeaders() + $headers);
  9.     }
  1.         $this->errorRenderer $errorRenderer;
  2.     }
  3.     public function __invoke(\Throwable $exception): Response
  4.     {
  5.         $exception $this->errorRenderer->render($exception);
  6.         return new Response($exception->getAsString(), $exception->getStatusCode(), $exception->getHeaders());
  7.     }
  8.     public function preview(Request $requestint $code): Response
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response$event);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  2.         $this->requestStack->push($request);
  3.         $response null;
  4.         try {
  5.             return $response $this->handleRaw($request$type);
  6.         } catch (\Throwable $e) {
  7.             if ($e instanceof \Error && !$this->handleAllThrowables) {
  8.                 throw $e;
  9.             }
  1.         }
  2.         $request $this->duplicateRequest($throwable$event->getRequest());
  3.         try {
  4.             $response $event->getKernel()->handle($requestHttpKernelInterface::SUB_REQUESTfalse);
  5.         } catch (\Exception $e) {
  6.             $f FlattenException::createFromThrowable($e);
  7.             $this->logException($e\sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)'$f->getClass(), $f->getMessage(), basename($e->getFile()), $e->getLine()));
  1.         $this->priority ??= $dispatcher->getListenerPriority($eventName$this->listener);
  2.         $e $this->stopwatch->start($this->name'event_listener');
  3.         try {
  4.             ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         } finally {
  6.             if ($e->isStarted()) {
  7.                 $e->stop();
  8.             }
  9.         }
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.      * Handles a throwable by trying to convert it to a Response.
  2.      */
  3.     private function handleThrowable(\Throwable $eRequest $requestint $type): Response
  4.     {
  5.         $event = new ExceptionEvent($this$request$type$e);
  6.         $this->dispatcher->dispatch($eventKernelEvents::EXCEPTION);
  7.         // a listener might have replaced the exception
  8.         $e $event->getThrowable();
  9.         if (!$event->hasResponse()) {
in vendor/symfony/http-kernel/HttpKernel.php -> handleThrowable (line 91)
  1.                 $this->finishRequest($request$type);
  2.                 throw $e;
  3.             }
  4.             return $response $this->handleThrowable($e$request$type);
  5.         } finally {
  6.             $this->requestStack->pop();
  7.             if ($response instanceof StreamedResponse && $callback $response->getCallback()) {
  8.                 $requestStack $this->requestStack;
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
  1.     ) {
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         if (Kernel::VERSION_ID >= 60400) {
  7.             $response->send(false);
  8.             if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in vendor/autoload_runtime.php -> run (line 29)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/var/www/vhosts/ohdev.ca/sites/test/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Twig\Error\ RuntimeError

An exception has been thrown during the rendering of a template ("Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php/session) failed: Permission denied (13)") in "@WebProfiler/Profiler/layout.html.twig" at line 40.

Warning: file_exists(): open_basedir restriction in effect. File(/sites/test/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig) is not within the allowed path(s): (/var/www/vhosts/ohdev.ca/:/tmp/) (500 Internal Server Error)

Symfony Exception

Warning: file_exists(): open_basedir restriction in effect. File(/sites/test/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig) is not within the allowed path(s): (/var/www/vhosts/ohdev.ca/:/tmp/)

Exceptions 4

ErrorException

Show exception properties
ErrorException {#1118
  #severity: E_WARNING
}
  1.         if ($line) {
  2.             $text .= ' at line '.$line;
  3.         }
  4.         if (!file_exists($file)) {
  5.             return $text;
  6.         }
  7.         $link $this->fileLinkFormat->format($file$line);
  1.     <?php if ($trace['file']) { ?>
  2.         <?php
  3.         $lineNumber $trace['line'] ?: 1;
  4.         $fileLink $this->fileLinkFormat->format($trace['file'], $lineNumber);
  5.         $filePath strtr(strip_tags($this->formatFile($trace['file'], $lineNumber)), [' at line '.$lineNumber => '']);
  6.         $filePathParts explode(\DIRECTORY_SEPARATOR$filePath);
  7.         ?>
  8.         <span class="block trace-file-path">
  9.             in
  10.             <a href="<?= $fileLink?>">
  1.     private function include(string $name, array $context = []): string
  2.     {
  3.         extract($context\EXTR_SKIP);
  4.         ob_start();
  5.         include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name $name;
  6.         return trim(ob_get_clean());
  7.     }
  8.     /**
  1.             $displayCodeSnippet $isFirstUserCode && !$isVendorTrace;
  2.             if ($displayCodeSnippet) {
  3.                 $isFirstUserCode false;
  4.             } ?>
  5.             <div class="trace-line <?= $isVendorTrace 'trace-from-vendor' ''?>">
  6.                 <?= $this->include('views/trace.html.php', [
  7.                     'prefix' => $index,
  8.                     'i' => $i,
  9.                     'trace' => $trace,
  10.                     'style' => $isVendorTrace 'compact' : ($displayCodeSnippet 'expanded' ''),
  11.                 ]); ?>
  1.     private function include(string $name, array $context = []): string
  2.     {
  3.         extract($context\EXTR_SKIP);
  4.         ob_start();
  5.         include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name $name;
  6.         return trim(ob_get_clean());
  7.     }
  8.     /**
  1.             </h3>
  2.             <div class="tab-content">
  3.                 <?php
  4.                 foreach ($exceptionAsArray as $i => $e) {
  5.                     echo $this->include('views/traces.html.php', [
  6.                         'exception' => $e,
  7.                         'index' => $i 1,
  8.                         'expand' => in_array($i$exceptionWithUserCodetrue) || ([] === $exceptionWithUserCode && === $i),
  9.                     ]);
  10.                 }
  1.     private function include(string $name, array $context = []): string
  2.     {
  3.         extract($context\EXTR_SKIP);
  4.         ob_start();
  5.         include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name $name;
  6.         return trim(ob_get_clean());
  7.     }
  8.     /**
  1.                     </div>
  2.                 </div>
  3.             </header>
  4.         <?php ?>
  5.         <?= $this->include('views/exception.html.php'$context); ?>
  6.         <script>
  7.             <?= $this->include('assets/js/exception.js'); ?>
  8.         </script>
  9.     </body>
  1.     private function include(string $name, array $context = []): string
  2.     {
  3.         extract($context\EXTR_SKIP);
  4.         ob_start();
  5.         include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name $name;
  6.         return trim(ob_get_clean());
  7.     }
  8.     /**
  1.             ]);
  2.         }
  3.         $exceptionMessage $this->escape($exception->getMessage());
  4.         return $this->include($debugTemplate, [
  5.             'exception' => $exception,
  6.             'exceptionMessage' => $exceptionMessage,
  7.             'statusText' => $statusText,
  8.             'statusCode' => $statusCode,
  9.             'logger' => null !== $this->logger && class_exists(DebugLoggerConfigurator::class) ? DebugLoggerConfigurator::getDebugLogger($this->logger) : null,
  1.             $headers['X-Debug-Exception-File'] = rawurlencode($exception->getFile()).':'.$exception->getLine();
  2.         }
  3.         $exception FlattenException::createWithDataRepresentation($exceptionnull$headers);
  4.         return $exception->setAsString($this->renderException($exception));
  5.     }
  6.     /**
  7.      * Gets the HTML content associated with the given exception.
  8.      */
  1.     {
  2.         $flattenException FlattenException::createFromThrowable($exception);
  3.         $debug \is_bool($this->debug) ? $this->debug : ($this->debug)($flattenException);
  4.         if ($debug || !$template $this->findTemplate($flattenException->getStatusCode())) {
  5.             return $this->fallbackErrorRenderer->render($exception);
  6.         }
  7.         return $flattenException->setAsString($this->twig->render($template, [
  8.             'exception' => $flattenException,
  9.             'status_code' => $flattenException->getStatusCode(),
  1.             $flattenException->setAsString($this->serializer->serialize($flattenException$format, [
  2.                 'exception' => $exception,
  3.                 'debug' => $debug,
  4.             ]));
  5.         } catch (NotEncodableValueException) {
  6.             $flattenException $this->fallbackErrorRenderer->render($exception);
  7.         }
  8.         return $flattenException->setHeaders($flattenException->getHeaders() + $headers);
  9.     }
  1.         $this->errorRenderer $errorRenderer;
  2.     }
  3.     public function __invoke(\Throwable $exception): Response
  4.     {
  5.         $exception $this->errorRenderer->render($exception);
  6.         return new Response($exception->getAsString(), $exception->getStatusCode(), $exception->getHeaders());
  7.     }
  8.     public function preview(Request $requestint $code): Response
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response$event);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  2.         $this->requestStack->push($request);
  3.         $response null;
  4.         try {
  5.             return $response $this->handleRaw($request$type);
  6.         } catch (\Throwable $e) {
  7.             if ($e instanceof \Error && !$this->handleAllThrowables) {
  8.                 throw $e;
  9.             }
  1.         }
  2.         $request $this->duplicateRequest($throwable$event->getRequest());
  3.         try {
  4.             $response $event->getKernel()->handle($requestHttpKernelInterface::SUB_REQUESTfalse);
  5.         } catch (\Exception $e) {
  6.             $f FlattenException::createFromThrowable($e);
  7.             $this->logException($e\sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)'$f->getClass(), $f->getMessage(), basename($e->getFile()), $e->getLine()));
  1.         $this->priority ??= $dispatcher->getListenerPriority($eventName$this->listener);
  2.         $e $this->stopwatch->start($this->name'event_listener');
  3.         try {
  4.             ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         } finally {
  6.             if ($e->isStarted()) {
  7.                 $e->stop();
  8.             }
  9.         }
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.      * Handles a throwable by trying to convert it to a Response.
  2.      */
  3.     private function handleThrowable(\Throwable $eRequest $requestint $type): Response
  4.     {
  5.         $event = new ExceptionEvent($this$request$type$e);
  6.         $this->dispatcher->dispatch($eventKernelEvents::EXCEPTION);
  7.         // a listener might have replaced the exception
  8.         $e $event->getThrowable();
  9.         if (!$event->hasResponse()) {
  1.         if ($pop $request !== $this->requestStack->getMainRequest()) {
  2.             $this->requestStack->push($request);
  3.         }
  4.         try {
  5.             $response $this->handleThrowable($exception$requestself::MAIN_REQUEST);
  6.         } finally {
  7.             if ($pop) {
  8.                 $this->requestStack->pop();
  9.             }
  10.         }
  1.                         if ($hasRun) {
  2.                             throw $e;
  3.                         }
  4.                         $hasRun true;
  5.                         $kernel->terminateWithException($e$request);
  6.                     };
  7.                 }
  8.             } elseif ($event instanceof ConsoleEvent && $app $event->getCommand()->getApplication()) {
  9.                 $output $event->getOutput();
  10.                 if ($output instanceof ConsoleOutputInterface) {
in /var/www/vhosts/ohdev.ca/sites/test/vendor/symfony/error-handler/ErrorHandler.php :: Symfony\Component\HttpKernel\EventListener\{closure} (line 538)
  1.             $this->exceptionHandler null;
  2.         }
  3.         try {
  4.             if (null !== $exceptionHandler) {
  5.                 $exceptionHandler($exception);
  6.                 return;
  7.             }
  8.             $handlerException ??= $exception;
  9.         } catch (\Throwable $handlerException) {
ErrorHandler->handleException()

ErrorException

Warning: file_exists(): open_basedir restriction in effect. File(/sites/test/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig) is not within the allowed path(s): (/var/www/vhosts/ohdev.ca/:/tmp/)

  1.         if ($line) {
  2.             $text .= ' at line '.$line;
  3.         }
  4.         if (!file_exists($file)) {
  5.             return $text;
  6.         }
  7.         $link $this->fileLinkFormat->format($file$line);
  1.     <?php if ($trace['file']) { ?>
  2.         <?php
  3.         $lineNumber $trace['line'] ?: 1;
  4.         $fileLink $this->fileLinkFormat->format($trace['file'], $lineNumber);
  5.         $filePath strtr(strip_tags($this->formatFile($trace['file'], $lineNumber)), [' at line '.$lineNumber => '']);
  6.         $filePathParts explode(\DIRECTORY_SEPARATOR$filePath);
  7.         ?>
  8.         <span class="block trace-file-path">
  9.             in
  10.             <a href="<?= $fileLink?>">
  1.     private function include(string $name, array $context = []): string
  2.     {
  3.         extract($context\EXTR_SKIP);
  4.         ob_start();
  5.         include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name $name;
  6.         return trim(ob_get_clean());
  7.     }
  8.     /**
  1.             $displayCodeSnippet $isFirstUserCode && !$isVendorTrace;
  2.             if ($displayCodeSnippet) {
  3.                 $isFirstUserCode false;
  4.             } ?>
  5.             <div class="trace-line <?= $isVendorTrace 'trace-from-vendor' ''?>">
  6.                 <?= $this->include('views/trace.html.php', [
  7.                     'prefix' => $index,
  8.                     'i' => $i,
  9.                     'trace' => $trace,
  10.                     'style' => $isVendorTrace 'compact' : ($displayCodeSnippet 'expanded' ''),
  11.                 ]); ?>
  1.     private function include(string $name, array $context = []): string
  2.     {
  3.         extract($context\EXTR_SKIP);
  4.         ob_start();
  5.         include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name $name;
  6.         return trim(ob_get_clean());
  7.     }
  8.     /**
  1.             </h3>
  2.             <div class="tab-content">
  3.                 <?php
  4.                 foreach ($exceptionAsArray as $i => $e) {
  5.                     echo $this->include('views/traces.html.php', [
  6.                         'exception' => $e,
  7.                         'index' => $i 1,
  8.                         'expand' => in_array($i$exceptionWithUserCodetrue) || ([] === $exceptionWithUserCode && === $i),
  9.                     ]);
  10.                 }
  1.     private function include(string $name, array $context = []): string
  2.     {
  3.         extract($context\EXTR_SKIP);
  4.         ob_start();
  5.         include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name $name;
  6.         return trim(ob_get_clean());
  7.     }
  8.     /**
  1.                     </div>
  2.                 </div>
  3.             </header>
  4.         <?php ?>
  5.         <?= $this->include('views/exception.html.php'$context); ?>
  6.         <script>
  7.             <?= $this->include('assets/js/exception.js'); ?>
  8.         </script>
  9.     </body>
  1.     private function include(string $name, array $context = []): string
  2.     {
  3.         extract($context\EXTR_SKIP);
  4.         ob_start();
  5.         include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name $name;
  6.         return trim(ob_get_clean());
  7.     }
  8.     /**
  1.             ]);
  2.         }
  3.         $exceptionMessage $this->escape($exception->getMessage());
  4.         return $this->include($debugTemplate, [
  5.             'exception' => $exception,
  6.             'exceptionMessage' => $exceptionMessage,
  7.             'statusText' => $statusText,
  8.             'statusCode' => $statusCode,
  9.             'logger' => null !== $this->logger && class_exists(DebugLoggerConfigurator::class) ? DebugLoggerConfigurator::getDebugLogger($this->logger) : null,
  1.             $headers['X-Debug-Exception-File'] = rawurlencode($exception->getFile()).':'.$exception->getLine();
  2.         }
  3.         $exception FlattenException::createWithDataRepresentation($exceptionnull$headers);
  4.         return $exception->setAsString($this->renderException($exception));
  5.     }
  6.     /**
  7.      * Gets the HTML content associated with the given exception.
  8.      */
  1.     {
  2.         $flattenException FlattenException::createFromThrowable($exception);
  3.         $debug \is_bool($this->debug) ? $this->debug : ($this->debug)($flattenException);
  4.         if ($debug || !$template $this->findTemplate($flattenException->getStatusCode())) {
  5.             return $this->fallbackErrorRenderer->render($exception);
  6.         }
  7.         return $flattenException->setAsString($this->twig->render($template, [
  8.             'exception' => $flattenException,
  9.             'status_code' => $flattenException->getStatusCode(),
  1.             $flattenException->setAsString($this->serializer->serialize($flattenException$format, [
  2.                 'exception' => $exception,
  3.                 'debug' => $debug,
  4.             ]));
  5.         } catch (NotEncodableValueException) {
  6.             $flattenException $this->fallbackErrorRenderer->render($exception);
  7.         }
  8.         return $flattenException->setHeaders($flattenException->getHeaders() + $headers);
  9.     }
  1.         $this->errorRenderer $errorRenderer;
  2.     }
  3.     public function __invoke(\Throwable $exception): Response
  4.     {
  5.         $exception $this->errorRenderer->render($exception);
  6.         return new Response($exception->getAsString(), $exception->getStatusCode(), $exception->getHeaders());
  7.     }
  8.     public function preview(Request $requestint $code): Response
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response$event);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  2.         $this->requestStack->push($request);
  3.         $response null;
  4.         try {
  5.             return $response $this->handleRaw($request$type);
  6.         } catch (\Throwable $e) {
  7.             if ($e instanceof \Error && !$this->handleAllThrowables) {
  8.                 throw $e;
  9.             }
  1.         }
  2.         $request $this->duplicateRequest($throwable$event->getRequest());
  3.         try {
  4.             $response $event->getKernel()->handle($requestHttpKernelInterface::SUB_REQUESTfalse);
  5.         } catch (\Exception $e) {
  6.             $f FlattenException::createFromThrowable($e);
  7.             $this->logException($e\sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)'$f->getClass(), $f->getMessage(), basename($e->getFile()), $e->getLine()));
  1.         $this->priority ??= $dispatcher->getListenerPriority($eventName$this->listener);
  2.         $e $this->stopwatch->start($this->name'event_listener');
  3.         try {
  4.             ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         } finally {
  6.             if ($e->isStarted()) {
  7.                 $e->stop();
  8.             }
  9.         }
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.      * Handles a throwable by trying to convert it to a Response.
  2.      */
  3.     private function handleThrowable(\Throwable $eRequest $requestint $type): Response
  4.     {
  5.         $event = new ExceptionEvent($this$request$type$e);
  6.         $this->dispatcher->dispatch($eventKernelEvents::EXCEPTION);
  7.         // a listener might have replaced the exception
  8.         $e $event->getThrowable();
  9.         if (!$event->hasResponse()) {
  1.                 $this->finishRequest($request$type);
  2.                 throw $e;
  3.             }
  4.             return $response $this->handleThrowable($e$request$type);
  5.         } finally {
  6.             $this->requestStack->pop();
  7.             if ($response instanceof StreamedResponse && $callback $response->getCallback()) {
  8.                 $requestStack $this->requestStack;
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
  1.     ) {
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         if (Kernel::VERSION_ID >= 60400) {
  7.             $response->send(false);
  8.             if (\function_exists('fastcgi_finish_request') && !$this->debug) {
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/var/www/vhosts/ohdev.ca/sites/test/vendor/autoload_runtime.php') in /var/www/vhosts/ohdev.ca/sites/test/public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Twig\Error\ RuntimeError

An exception has been thrown during the rendering of a template ("Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php/session) failed: Permission denied (13)") in "@WebProfiler/Profiler/layout.html.twig" at line 40.


Fatal error: Uncaught ErrorException: Warning: file_exists(): open_basedir restriction in effect. File(/sites/test/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig) is not within the allowed path(s): (/var/www/vhosts/ohdev.ca/:/tmp/) in /var/www/vhosts/ohdev.ca/sites/test/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php:234 Stack trace: #0 /var/www/vhosts/ohdev.ca/sites/test/vendor/symfony/error-handler/Resources/views/trace.html.php(15): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->formatFile() #1 /var/www/vhosts/ohdev.ca/sites/test/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(343): include('...') #2 /var/www/vhosts/ohdev.ca/sites/test/vendor/symfony/error-handler/Resources/views/traces.html.php(48): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->include() #3 /var/www/vhosts/ohdev.ca/sites/test/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(343): include('...') #4 /var/www/vhosts/ohdev.ca/sites/test/vendor/symfony/error-handler/Resources/views/exception.html.php(54): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->include() #5 /var/www/vhosts/ohdev.ca/sites/test/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(343): include('...') #6 /var/www/vhosts/ohdev.ca/sites/test/vendor/symfony/error-handler/Resources/views/exception_full.html.php(35): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->include() #7 /var/www/vhosts/ohdev.ca/sites/test/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(343): include('...') #8 /var/www/vhosts/ohdev.ca/sites/test/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(138): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->include() #9 /var/www/vhosts/ohdev.ca/sites/test/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(70): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->renderException() #10 /var/www/vhosts/ohdev.ca/sites/test/vendor/symfony/error-handler/ErrorHandler.php(655): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->render() #11 /var/www/vhosts/ohdev.ca/sites/test/vendor/symfony/error-handler/ErrorHandler.php(538): Symfony\Component\ErrorHandler\ErrorHandler->renderException() #12 /var/www/vhosts/ohdev.ca/sites/test/vendor/symfony/error-handler/ErrorHandler.php(556): Symfony\Component\ErrorHandler\ErrorHandler->handleException() #13 [internal function]: Symfony\Component\ErrorHandler\ErrorHandler->handleException() #14 {main} thrown in /var/www/vhosts/ohdev.ca/sites/test/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php on line 234