Symfony Exception

InvalidArgumentException RuntimeError

HTTP 500 Internal Server Error

Warning: file_exists(): open_basedir restriction in effect. File(/states/sensor.agence_web_ldiro_battery". Did you forget to add "http(s)://"?") in "screen/tesla.html.twig) is not within the allowed path(s): (/var/www/vhosts/ldiro-softwares.dev/:/tmp/) (500 Internal Server Error)

Symfony Exception

Warning: file_exists(): open_basedir restriction in effect. File(/states/sensor.agence_web_ldiro_battery". Did you forget to add "http(s)://"?") in "screen/tesla.html.twig) is not within the allowed path(s): (/var/www/vhosts/ldiro-softwares.dev/:/tmp/)

Exceptions 3

ErrorException

Show exception properties
ErrorException {#1015
  #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. return trim($line);
  2. }
  3. private function formatFileFromText(string $text): string
  4. {
  5. return preg_replace_callback('/in ("|&quot;)?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', fn ($match) => 'in '.$this->formatFile($match[2], $match[3]), $text) ?? $text;
  6. }
  7. private function formatLogMessage(string $message, array $context): string
  8. {
  9. if ($context && str_contains($message, '{')) {
HtmlErrorRenderer->{closure:Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer::formatFileFromText():310}()
  1. return trim($line);
  2. }
  3. private function formatFileFromText(string $text): string
  4. {
  5. return preg_replace_callback('/in ("|&quot;)?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', fn ($match) => 'in '.$this->formatFile($match[2], $match[3]), $text) ?? $text;
  6. }
  7. private function formatLogMessage(string $message, array $context): string
  8. {
  9. if ($context && str_contains($message, '{')) {
  1. </h2>
  2. </div>
  3. </div>
  4. <div class="exception-message-wrapper">
  5. <div class="container">
  6. <h1 class="break-long-words exception-message<?= mb_strlen($exceptionMessage) > 180 ? ' long' : ''; ?>"><?= $this->formatFileFromText(nl2br($exceptionMessage)); ?></h1>
  7. <div class="exception-illustration hidden-xs-down">
  8. <?= $this->include('assets/images/symfony-ghost.svg.php'); ?>
  9. </div>
  10. </div>
  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. $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. $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 $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. $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/ldiro-softwares.dev/home.ldiro-softwares.dev/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 ("Invalid URL: scheme is missing in "/states/sensor.agence_web_ldiro_battery". Did you forget to add "http(s)://"?") in "screen/tesla.html.twig" at line 12.

Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/ldiro.com/homeassistant.ldiro.com/templates/screen/tesla.html.twig) is not within the allowed path(s): (/var/www/vhosts/ldiro-softwares.dev/:/tmp/) (500 Internal Server Error)

Symfony Exception

Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/ldiro.com/homeassistant.ldiro.com/templates/screen/tesla.html.twig) is not within the allowed path(s): (/var/www/vhosts/ldiro-softwares.dev/:/tmp/)

Exceptions 4

ErrorException

Show exception properties
ErrorException {#1287
  #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. $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. $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 $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/ldiro-softwares.dev/home.ldiro-softwares.dev/vendor/symfony/error-handler/ErrorHandler.php :: {closure:Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure():78} (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(/states/sensor.agence_web_ldiro_battery&amp;quot;. Did you forget to add &amp;quot;http(s)://&amp;quot;?&amp;quot;) in &amp;quot;screen/tesla.html.twig) is not within the allowed path(s): (/var/www/vhosts/ldiro-softwares.dev/:/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. return trim($line);
  2. }
  3. private function formatFileFromText(string $text): string
  4. {
  5. return preg_replace_callback('/in ("|&quot;)?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', fn ($match) => 'in '.$this->formatFile($match[2], $match[3]), $text) ?? $text;
  6. }
  7. private function formatLogMessage(string $message, array $context): string
  8. {
  9. if ($context && str_contains($message, '{')) {
HtmlErrorRenderer->{closure:Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer::formatFileFromText():310}()
  1. return trim($line);
  2. }
  3. private function formatFileFromText(string $text): string
  4. {
  5. return preg_replace_callback('/in ("|&quot;)?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', fn ($match) => 'in '.$this->formatFile($match[2], $match[3]), $text) ?? $text;
  6. }
  7. private function formatLogMessage(string $message, array $context): string
  8. {
  9. if ($context && str_contains($message, '{')) {
  1. </h2>
  2. </div>
  3. </div>
  4. <div class="exception-message-wrapper">
  5. <div class="container">
  6. <h1 class="break-long-words exception-message<?= mb_strlen($exceptionMessage) > 180 ? ' long' : ''; ?>"><?= $this->formatFileFromText(nl2br($exceptionMessage)); ?></h1>
  7. <div class="exception-illustration hidden-xs-down">
  8. <?= $this->include('assets/images/symfony-ghost.svg.php'); ?>
  9. </div>
  10. </div>
  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. $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. $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 $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. $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/ldiro-softwares.dev/home.ldiro-softwares.dev/vendor/autoload_runtime.php') in /var/www/vhosts/ldiro-softwares.dev/home.ldiro-softwares.dev/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 ("Invalid URL: scheme is missing in "/states/sensor.agence_web_ldiro_battery". Did you forget to add "http(s)://"?") in "screen/tesla.html.twig" at line 12.


Fatal error: Uncaught ErrorException: Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/ldiro.com/homeassistant.ldiro.com/templates/screen/tesla.html.twig) is not within the allowed path(s): (/var/www/vhosts/ldiro-softwares.dev/:/tmp/) in /var/www/vhosts/ldiro-softwares.dev/home.ldiro-softwares.dev/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php:236 Stack trace: #0 /var/www/vhosts/ldiro-softwares.dev/home.ldiro-softwares.dev/vendor/symfony/error-handler/Resources/views/trace.html.php(15): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->formatFile() #1 /var/www/vhosts/ldiro-softwares.dev/home.ldiro-softwares.dev/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(345): include('...') #2 /var/www/vhosts/ldiro-softwares.dev/home.ldiro-softwares.dev/vendor/symfony/error-handler/Resources/views/traces.html.php(48): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->include() #3 /var/www/vhosts/ldiro-softwares.dev/home.ldiro-softwares.dev/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(345): include('...') #4 /var/www/vhosts/ldiro-softwares.dev/home.ldiro-softwares.dev/vendor/symfony/error-handler/Resources/views/exception.html.php(54): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->include() #5 /var/www/vhosts/ldiro-softwares.dev/home.ldiro-softwares.dev/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(345): include('...') #6 /var/www/vhosts/ldiro-softwares.dev/home.ldiro-softwares.dev/vendor/symfony/error-handler/Resources/views/exception_full.html.php(35): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->include() #7 /var/www/vhosts/ldiro-softwares.dev/home.ldiro-softwares.dev/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(345): include('...') #8 /var/www/vhosts/ldiro-softwares.dev/home.ldiro-softwares.dev/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(140): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->include() #9 /var/www/vhosts/ldiro-softwares.dev/home.ldiro-softwares.dev/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(72): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->renderException() #10 /var/www/vhosts/ldiro-softwares.dev/home.ldiro-softwares.dev/vendor/symfony/error-handler/ErrorHandler.php(655): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->render() #11 /var/www/vhosts/ldiro-softwares.dev/home.ldiro-softwares.dev/vendor/symfony/error-handler/ErrorHandler.php(538): Symfony\Component\ErrorHandler\ErrorHandler->renderException() #12 /var/www/vhosts/ldiro-softwares.dev/home.ldiro-softwares.dev/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/ldiro-softwares.dev/home.ldiro-softwares.dev/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php on line 236