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/sessions) failed: Permission denied (13)").

Exceptions 2

Twig\Error\ RuntimeError

Show exception properties
Twig\Error\RuntimeError {#1904
  -lineno: 40
  -name: "@WebProfiler/Profiler/layout.html.twig"
  -rawMessage: "An exception has been thrown during the rendering of a template ("Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php/sessions) failed: Permission denied (13)")."
  -sourcePath: "/var/www/83/bmwcsee-followup-mailer/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig"
  -sourceCode: """
    {% 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
    """
}
Warning: is_file(): open_basedir restriction in effect. File(/var/www/83/bmwcsee-followup-mailer/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig) is not within the allowed path(s): (/var/www/html/bmw_service_inclusive_com:/tmp:/dev/urandom) (500 Internal Server Error)

Symfony Exception

Warning: is_file(): open_basedir restriction in effect. File(/var/www/83/bmwcsee-followup-mailer/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig) is not within the allowed path(s): (/var/www/html/bmw_service_inclusive_com:/tmp:/dev/urandom)

Exceptions 3

ErrorException

Show exception properties
ErrorException {#1673
  #severity: E_WARNING
}
  1. * @param int $line The selected line number
  2. * @param int $srcContext The number of displayed lines around or -1 for the whole file
  3. */
  4. private function fileExcerpt(string $file, int $line, int $srcContext = 3): string
  5. {
  6. if (is_file($file) && is_readable($file)) {
  7. // highlight_file could throw warnings
  8. // see https://bugs.php.net/25725
  9. $code = @highlight_file($file, true);
  10. if (\PHP_VERSION_ID >= 80300) {
  11. // remove main pre/code tags
  1. </span>
  2. <?php } ?>
  3. </div>
  4. <?php if ($trace['file']) { ?>
  5. <div id="trace-html-<?= $prefix.'-'.$i; ?>" class="trace-code sf-toggle-content">
  6. <?= strtr($this->fileExcerpt($trace['file'], $trace['line'], 5), [
  7. 'var(--highlight-string)' => 'var(--highlight-string)',
  8. 'var(--highlight-keyword)' => 'var(--highlight-keyword)',
  9. 'var(--highlight-default)' => 'var(--highlight-default)',
  10. 'var(--highlight-comment)' => 'var(--highlight-comment)',
  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. $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. $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 $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);
  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/html/bmw_service_inclusive_com/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. ini_set('memory_limit', '256M');
  5. ini_set('max_execution_time', '600');
  6. return function (array $context) {

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/sessions) failed: Permission denied (13)").

Warning: is_file(): open_basedir restriction in effect. File(/var/www/83/bmwcsee-followup-mailer/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig) is not within the allowed path(s): (/var/www/html/bmw_service_inclusive_com:/tmp:/dev/urandom) (500 Internal Server Error)

Symfony Exception

Warning: is_file(): open_basedir restriction in effect. File(/var/www/83/bmwcsee-followup-mailer/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig) is not within the allowed path(s): (/var/www/html/bmw_service_inclusive_com:/tmp:/dev/urandom)

Exceptions 4

ErrorException

Show exception properties
ErrorException {#1507
  #severity: E_WARNING
}
  1. * @param int $line The selected line number
  2. * @param int $srcContext The number of displayed lines around or -1 for the whole file
  3. */
  4. private function fileExcerpt(string $file, int $line, int $srcContext = 3): string
  5. {
  6. if (is_file($file) && is_readable($file)) {
  7. // highlight_file could throw warnings
  8. // see https://bugs.php.net/25725
  9. $code = @highlight_file($file, true);
  10. if (\PHP_VERSION_ID >= 80300) {
  11. // remove main pre/code tags
  1. </span>
  2. <?php } ?>
  3. </div>
  4. <?php if ($trace['file']) { ?>
  5. <div id="trace-html-<?= $prefix.'-'.$i; ?>" class="trace-code sf-toggle-content">
  6. <?= strtr($this->fileExcerpt($trace['file'], $trace['line'], 5), [
  7. 'var(--highlight-string)' => 'var(--highlight-string)',
  8. 'var(--highlight-keyword)' => 'var(--highlight-keyword)',
  9. 'var(--highlight-default)' => 'var(--highlight-default)',
  10. 'var(--highlight-comment)' => 'var(--highlight-comment)',
  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. $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. $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 $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);
  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/html/bmw_service_inclusive_com/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: is_file(): open_basedir restriction in effect. File(/var/www/83/bmwcsee-followup-mailer/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig) is not within the allowed path(s): (/var/www/html/bmw_service_inclusive_com:/tmp:/dev/urandom)

  1. * @param int $line The selected line number
  2. * @param int $srcContext The number of displayed lines around or -1 for the whole file
  3. */
  4. private function fileExcerpt(string $file, int $line, int $srcContext = 3): string
  5. {
  6. if (is_file($file) && is_readable($file)) {
  7. // highlight_file could throw warnings
  8. // see https://bugs.php.net/25725
  9. $code = @highlight_file($file, true);
  10. if (\PHP_VERSION_ID >= 80300) {
  11. // remove main pre/code tags
  1. </span>
  2. <?php } ?>
  3. </div>
  4. <?php if ($trace['file']) { ?>
  5. <div id="trace-html-<?= $prefix.'-'.$i; ?>" class="trace-code sf-toggle-content">
  6. <?= strtr($this->fileExcerpt($trace['file'], $trace['line'], 5), [
  7. 'var(--highlight-string)' => 'var(--highlight-string)',
  8. 'var(--highlight-keyword)' => 'var(--highlight-keyword)',
  9. 'var(--highlight-default)' => 'var(--highlight-default)',
  10. 'var(--highlight-comment)' => 'var(--highlight-comment)',
  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. $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. $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 $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);
  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/html/bmw_service_inclusive_com/vendor/autoload_runtime.php') in /var/www/html/bmw_service_inclusive_com/public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. ini_set('memory_limit', '256M');
  5. ini_set('max_execution_time', '600');
  6. return function (array $context) {

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/sessions) failed: Permission denied (13)").


Fatal error: Uncaught ErrorException: Warning: is_file(): open_basedir restriction in effect. File(/var/www/83/bmwcsee-followup-mailer/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig) is not within the allowed path(s): (/var/www/html/bmw_service_inclusive_com:/tmp:/dev/urandom) in /var/www/html/bmw_service_inclusive_com/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php:248 Stack trace: #0 /var/www/html/bmw_service_inclusive_com/vendor/symfony/error-handler/Resources/views/trace.html.php(36): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->fileExcerpt() #1 /var/www/html/bmw_service_inclusive_com/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(339): include('...') #2 /var/www/html/bmw_service_inclusive_com/vendor/symfony/error-handler/Resources/views/traces.html.php(48): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->include() #3 /var/www/html/bmw_service_inclusive_com/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(339): include('...') #4 /var/www/html/bmw_service_inclusive_com/vendor/symfony/error-handler/Resources/views/exception.html.php(54): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->include() #5 /var/www/html/bmw_service_inclusive_com/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(339): include('...') #6 /var/www/html/bmw_service_inclusive_com/vendor/symfony/error-handler/Resources/views/exception_full.html.php(35): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->include() #7 /var/www/html/bmw_service_inclusive_com/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(339): include('...') #8 /var/www/html/bmw_service_inclusive_com/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(138): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->include() #9 /var/www/html/bmw_service_inclusive_com/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(70): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->renderException() #10 /var/www/html/bmw_service_inclusive_com/vendor/symfony/error-handler/ErrorHandler.php(655): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->render() #11 /var/www/html/bmw_service_inclusive_com/vendor/symfony/error-handler/ErrorHandler.php(538): Symfony\Component\ErrorHandler\ErrorHandler->renderException() #12 /var/www/html/bmw_service_inclusive_com/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/html/bmw_service_inclusive_com/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php on line 248