Symfony Exception

ErrorException RuntimeError

HTTP 500 Internal Server Error

An exception has been thrown during the rendering of a template ("Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/nwt.de/fileshare.nwt.de/vendor/symfony/http-kernel/EventListener/RouterListener.php) is not within the allowed path(s): (/var/www/vhosts/fileshare.nwt.de/:/tmp/)") in @WebProfiler/Collector/exception.html.twig at line 42.

Exceptions 2

Twig\Error\ RuntimeError

Show exception properties
Twig\Error\RuntimeError {#1698
  -lineno: 42
  -columnno: null
  -rawMessage: "An exception has been thrown during the rendering of a template ("Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/nwt.de/fileshare.nwt.de/vendor/symfony/http-kernel/EventListener/RouterListener.php) is not within the allowed path(s): (/var/www/vhosts/fileshare.nwt.de/:/tmp/)")."
  -source: Twig\Source {#2482
    -code: """
      {% extends '@WebProfiler/Profiler/layout.html.twig' %}\n
      \n
      {% block head %}\n
          {% if collector.hasexception %}\n
              <style>\n
                  {{ render(controller('web_profiler.controller.exception_panel::stylesheet', {token: token})) }}\n
                  {{ include('@WebProfiler/Collector/exception.css.twig') }}\n
              </style>\n
          {% endif %}\n
          {{ parent() }}\n
      {% endblock %}\n
      \n
      {% block menu %}\n
          <span class="label {{ collector.hasexception ? 'label-status-error' : 'disabled' }}">\n
              <span class="icon">{{ source('@WebProfiler/Icon/exception.svg') }}</span>\n
              <strong>Exception</strong>\n
              {% if collector.hasexception %}\n
                  <span class="count">\n
                      <span>1</span>\n
                  </span>\n
              {% endif %}\n
          </span>\n
      {% endblock %}\n
      \n
      {% block panel %}\n
          {# these styles are needed to override some styles from Exception page, which wasn't\n
             updated yet to the new style of the Symfony Profiler #}\n
          <style>\n
              .tab-navigation li { background: none; border: 0; font-size: 14px; }\n
              .tab-navigation li.active { border-radius: 6px; }\n
              .tab-navigation li.active .badge { background-color: var(--selected-badge-background); color: var(--selected-badge-color); }\n
          </style>\n
      \n
          <h2>Exceptions</h2>\n
      \n
          {% if not collector.hasexception %}\n
              <div class="empty empty-panel">\n
                  <p>No exception was thrown and caught.</p>\n
              </div>\n
          {% else %}\n
              <div class="sf-reset">\n
                  {{ render(controller('web_profiler.controller.exception_panel::body', {token: token})) }}\n
              </div>\n
          {% endif %}\n
      {% endblock %}\n
      """
    -name: "@WebProfiler/Collector/exception.html.twig"
    -path: "/var/www/vhosts/nwt.de/fileshare.nwt.de/vendor/symfony/web-profiler-bundle/Resources/views/Collector/exception.html.twig"
  }
  -phpFile: "/var/www/vhosts/fileshare.nwt.de/fileshare.nwt.de/vendor/twig/twig/src/Template.php"
  -phpLine: 610
}
Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/nwt.de/fileshare.nwt.de/vendor/symfony/web-profiler-bundle/Resources/views/Collector/exception.html.twig) is not within the allowed path(s): (/var/www/vhosts/fileshare.nwt.de/:/tmp/) (500 Internal Server Error)

Symfony Exception

Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/nwt.de/fileshare.nwt.de/vendor/symfony/web-profiler-bundle/Resources/views/Collector/exception.html.twig) is not within the allowed path(s): (/var/www/vhosts/fileshare.nwt.de/:/tmp/)

Exceptions 3

ErrorException

Show exception properties
ErrorException {#2607
  #severity: E_WARNING
}
  1. if (0 < $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, $exceptionWithUserCode, true) || ([] === $exceptionWithUserCode && 0 === $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($exception, null, $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. include_once \dirname(__DIR__, 4).'/vendor/symfony/framework-bundle/ErrorHandler/ErrorRenderer/RuntimeModeErrorRendererSelector.php';
  2. include_once \dirname(__DIR__, 4).'/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php';
  3. $a = ($container->services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack());
  4. return $container->services['error_controller'] = new \Symfony\Component\HttpKernel\Controller\ErrorController(($container->services['http_kernel'] ?? self::getHttpKernelService($container)), 'error_controller', new \Symfony\Component\ErrorHandler\ErrorRenderer\SerializerErrorRenderer(($container->privates['debug.serializer'] ?? self::getDebug_SerializerService($container)), \Symfony\Component\ErrorHandler\ErrorRenderer\SerializerErrorRenderer::getPreferredFormat($a), new class(fn () => \Symfony\Bundle\FrameworkBundle\ErrorHandler\ErrorRenderer\RuntimeModeErrorRendererSelector::select($container->getEnv('bool:default::key:web:default:kernel.runtime_mode:'), #[\Closure(name: 'twig.error_renderer.html', class: 'Symfony\\Bridge\\Twig\\ErrorRenderer\\TwigErrorRenderer')] fn () => ($container->privates['twig.error_renderer.html'] ?? $container->load('getTwig_ErrorRenderer_HtmlService')), #[\Closure(name: 'error_handler.error_renderer.cli', class: 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\CliErrorRenderer')] fn () => ($container->privates['error_handler.error_renderer.cli'] ??= new \Symfony\Component\ErrorHandler\ErrorRenderer\CliErrorRenderer()))) extends \Symfony\Component\DependencyInjection\Argument\LazyClosure implements \Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRendererInterface { public function render(\Throwable $exception): \Symfony\Component\ErrorHandler\Exception\FlattenException { return $this->service->render(...\func_get_args()); } }, \Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer::isDebug($a, true)));
  5. }
  6. }
  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. ) {
  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 $request, int $code): Response
  1. $this->dispatcher->dispatch($event, KernelEvents::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($event, KernelEvents::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($request, HttpKernelInterface::SUB_REQUEST, false);
  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. $closure = static function (...$args) use (&$listener, &$closure) {
  2. if ($listener[0] instanceof \Closure) {
  3. $listener[0] = $listener[0]();
  4. $listener[1] ??= '__invoke';
  5. }
  6. ($closure = $listener(...))(...$args);
  7. };
  8. } else {
  9. $closure = $listener instanceof WrappedListener ? $listener : $listener(...);
  10. }
  11. }
in vendor/symfony/event-dispatcher/EventDispatcher.php :: {closure:Symfony\Component\EventDispatcher\EventDispatcher::optimizeListeners():249} (line 206)
  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. }
  2. public function dispatch(object $event, ?string $eventName = null): object
  3. {
  4. if ($this->disabled?->__invoke()) {
  5. return $this->dispatcher->dispatch($event, $eventName);
  6. }
  7. $eventName ??= $event::class;
  8. $this->callStack ??= new \SplObjectStorage();
  1. * Handles a throwable by trying to convert it to a Response.
  2. */
  3. private function handleThrowable(\Throwable $e, Request $request, int $type): Response
  4. {
  5. $event = new ExceptionEvent($this, $request, $type, $e, isKernelTerminating: $this->terminating);
  6. $this->dispatcher->dispatch($event, KernelEvents::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. if (!$this->handlingHttpCache) {
  2. $this->resetServices = true;
  3. }
  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. $response->send(false);
  7. if (\function_exists('fastcgi_finish_request') && !$this->debug) {
  8. fastcgi_finish_request();
in vendor/autoload_runtime.php -> run (line 32)
  1. $app = $app(...$args);
  2. exit(
  3. $runtime
  4. ->getRunner($app)
  5. ->run()
  6. );
require_once('/var/www/vhosts/fileshare.nwt.de/fileshare.nwt.de/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 static 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 ("Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/nwt.de/fileshare.nwt.de/vendor/symfony/http-kernel/EventListener/RouterListener.php) is not within the allowed path(s): (/var/www/vhosts/fileshare.nwt.de/:/tmp/)") in "@WebProfiler/Collector/exception.html.twig" at line 42.

Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/nwt.de/fileshare.nwt.de/vendor/symfony/web-profiler-bundle/Resources/views/Collector/exception.html.twig) is not within the allowed path(s): (/var/www/vhosts/fileshare.nwt.de/:/tmp/) (500 Internal Server Error)

Symfony Exception

Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/nwt.de/fileshare.nwt.de/vendor/symfony/web-profiler-bundle/Resources/views/Collector/exception.html.twig) is not within the allowed path(s): (/var/www/vhosts/fileshare.nwt.de/:/tmp/)

Exceptions 4

ErrorException

Show exception properties
ErrorException {#2615
  #severity: E_WARNING
}
  1. if (0 < $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, $exceptionWithUserCode, true) || ([] === $exceptionWithUserCode && 0 === $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($exception, null, $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. include_once \dirname(__DIR__, 4).'/vendor/symfony/framework-bundle/ErrorHandler/ErrorRenderer/RuntimeModeErrorRendererSelector.php';
  2. include_once \dirname(__DIR__, 4).'/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php';
  3. $a = ($container->services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack());
  4. return $container->services['error_controller'] = new \Symfony\Component\HttpKernel\Controller\ErrorController(($container->services['http_kernel'] ?? self::getHttpKernelService($container)), 'error_controller', new \Symfony\Component\ErrorHandler\ErrorRenderer\SerializerErrorRenderer(($container->privates['debug.serializer'] ?? self::getDebug_SerializerService($container)), \Symfony\Component\ErrorHandler\ErrorRenderer\SerializerErrorRenderer::getPreferredFormat($a), new class(fn () => \Symfony\Bundle\FrameworkBundle\ErrorHandler\ErrorRenderer\RuntimeModeErrorRendererSelector::select($container->getEnv('bool:default::key:web:default:kernel.runtime_mode:'), #[\Closure(name: 'twig.error_renderer.html', class: 'Symfony\\Bridge\\Twig\\ErrorRenderer\\TwigErrorRenderer')] fn () => ($container->privates['twig.error_renderer.html'] ?? $container->load('getTwig_ErrorRenderer_HtmlService')), #[\Closure(name: 'error_handler.error_renderer.cli', class: 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\CliErrorRenderer')] fn () => ($container->privates['error_handler.error_renderer.cli'] ??= new \Symfony\Component\ErrorHandler\ErrorRenderer\CliErrorRenderer()))) extends \Symfony\Component\DependencyInjection\Argument\LazyClosure implements \Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRendererInterface { public function render(\Throwable $exception): \Symfony\Component\ErrorHandler\Exception\FlattenException { return $this->service->render(...\func_get_args()); } }, \Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer::isDebug($a, true)));
  5. }
  6. }
  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. ) {
  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 $request, int $code): Response
  1. $this->dispatcher->dispatch($event, KernelEvents::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($event, KernelEvents::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($request, HttpKernelInterface::SUB_REQUEST, false);
  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. 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. }
  2. public function dispatch(object $event, ?string $eventName = null): object
  3. {
  4. if ($this->disabled?->__invoke()) {
  5. return $this->dispatcher->dispatch($event, $eventName);
  6. }
  7. $eventName ??= $event::class;
  8. $this->callStack ??= new \SplObjectStorage();
  1. * Handles a throwable by trying to convert it to a Response.
  2. */
  3. private function handleThrowable(\Throwable $e, Request $request, int $type): Response
  4. {
  5. $event = new ExceptionEvent($this, $request, $type, $e, isKernelTerminating: $this->terminating);
  6. $this->dispatcher->dispatch($event, KernelEvents::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, $request, self::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/fileshare.nwt.de/fileshare.nwt.de/vendor/symfony/error-handler/ErrorHandler.php :: {closure:Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure():71} (line 545)
  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(/var/www/vhosts/nwt.de/fileshare.nwt.de/vendor/symfony/web-profiler-bundle/Resources/views/Collector/exception.html.twig) is not within the allowed path(s): (/var/www/vhosts/fileshare.nwt.de/:/tmp/)

  1. if (0 < $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, $exceptionWithUserCode, true) || ([] === $exceptionWithUserCode && 0 === $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($exception, null, $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. include_once \dirname(__DIR__, 4).'/vendor/symfony/framework-bundle/ErrorHandler/ErrorRenderer/RuntimeModeErrorRendererSelector.php';
  2. include_once \dirname(__DIR__, 4).'/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php';
  3. $a = ($container->services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack());
  4. return $container->services['error_controller'] = new \Symfony\Component\HttpKernel\Controller\ErrorController(($container->services['http_kernel'] ?? self::getHttpKernelService($container)), 'error_controller', new \Symfony\Component\ErrorHandler\ErrorRenderer\SerializerErrorRenderer(($container->privates['debug.serializer'] ?? self::getDebug_SerializerService($container)), \Symfony\Component\ErrorHandler\ErrorRenderer\SerializerErrorRenderer::getPreferredFormat($a), new class(fn () => \Symfony\Bundle\FrameworkBundle\ErrorHandler\ErrorRenderer\RuntimeModeErrorRendererSelector::select($container->getEnv('bool:default::key:web:default:kernel.runtime_mode:'), #[\Closure(name: 'twig.error_renderer.html', class: 'Symfony\\Bridge\\Twig\\ErrorRenderer\\TwigErrorRenderer')] fn () => ($container->privates['twig.error_renderer.html'] ?? $container->load('getTwig_ErrorRenderer_HtmlService')), #[\Closure(name: 'error_handler.error_renderer.cli', class: 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\CliErrorRenderer')] fn () => ($container->privates['error_handler.error_renderer.cli'] ??= new \Symfony\Component\ErrorHandler\ErrorRenderer\CliErrorRenderer()))) extends \Symfony\Component\DependencyInjection\Argument\LazyClosure implements \Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRendererInterface { public function render(\Throwable $exception): \Symfony\Component\ErrorHandler\Exception\FlattenException { return $this->service->render(...\func_get_args()); } }, \Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer::isDebug($a, true)));
  5. }
  6. }
  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. ) {
  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 $request, int $code): Response
  1. $this->dispatcher->dispatch($event, KernelEvents::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($event, KernelEvents::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($request, HttpKernelInterface::SUB_REQUEST, false);
  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. $closure = static function (...$args) use (&$listener, &$closure) {
  2. if ($listener[0] instanceof \Closure) {
  3. $listener[0] = $listener[0]();
  4. $listener[1] ??= '__invoke';
  5. }
  6. ($closure = $listener(...))(...$args);
  7. };
  8. } else {
  9. $closure = $listener instanceof WrappedListener ? $listener : $listener(...);
  10. }
  11. }
in /var/www/vhosts/fileshare.nwt.de/fileshare.nwt.de/vendor/symfony/event-dispatcher/EventDispatcher.php :: {closure:Symfony\Component\EventDispatcher\EventDispatcher::optimizeListeners():249} (line 206)
  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. }
  2. public function dispatch(object $event, ?string $eventName = null): object
  3. {
  4. if ($this->disabled?->__invoke()) {
  5. return $this->dispatcher->dispatch($event, $eventName);
  6. }
  7. $eventName ??= $event::class;
  8. $this->callStack ??= new \SplObjectStorage();
  1. * Handles a throwable by trying to convert it to a Response.
  2. */
  3. private function handleThrowable(\Throwable $e, Request $request, int $type): Response
  4. {
  5. $event = new ExceptionEvent($this, $request, $type, $e, isKernelTerminating: $this->terminating);
  6. $this->dispatcher->dispatch($event, KernelEvents::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. if (!$this->handlingHttpCache) {
  2. $this->resetServices = true;
  3. }
  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. $response->send(false);
  7. if (\function_exists('fastcgi_finish_request') && !$this->debug) {
  8. fastcgi_finish_request();
  1. $app = $app(...$args);
  2. exit(
  3. $runtime
  4. ->getRunner($app)
  5. ->run()
  6. );
require_once('/var/www/vhosts/fileshare.nwt.de/fileshare.nwt.de/vendor/autoload_runtime.php') in /var/www/vhosts/fileshare.nwt.de/fileshare.nwt.de/public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return static 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 ("Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/nwt.de/fileshare.nwt.de/vendor/symfony/http-kernel/EventListener/RouterListener.php) is not within the allowed path(s): (/var/www/vhosts/fileshare.nwt.de/:/tmp/)") in "@WebProfiler/Collector/exception.html.twig" at line 42.


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