Recuperar contraseña
Le enviaremos las instrucciones por correo electrónico
An exception has been thrown during the rendering of a template ("Failed to start the session because headers have already been sent by "/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-foundation/Response.php" at line 368."). (500 Internal Server Error)

Symfony Exception

EnvNotFoundException RuntimeException RuntimeError

HTTP 500 Internal Server Error

An exception has been thrown during the rendering of a template ("Failed to start the session because headers have already been sent by "/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-foundation/Response.php" at line 368.").

Exceptions 3

Twig\Error\ RuntimeError

  1.     <!-- /theme JS files -->
  2.     <script type="text/javascript">
  3.         $(document).ready(function () {
  4.             {% if (app.session.get('administrador') is defined and app.session.get('administrador')) or (app.session.get('grupoEmpresa') is defined and app.session.get('grupoEmpresa')) %}
  5.                 //Recuperamos las empresas
  6.                 $.ajax({
  7.                     type: "POST",
  8.                     url: "{{ path('recuperar_empresas') }}",
  9.                     data: {
  1.         return $this->blocks;
  2.     }
  3.     public function display(array $context, array $blocks = [])
  4.     {
  5.         $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks$blocks));
  6.     }
  7.     public function render(array $context)
  8.     {
  9.         $level ob_get_level();
  1.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  2.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""error/error.html.twig"));
  3.         // line 1
  4.         $this->loadTemplate("theme/header.html.twig""error/error.html.twig"1)->display($context);
  5.         // line 2
  6.         echo "
  7. <body>
  8. <div class=\"page-content\">
  9.     <div class=\"content-wrapper\">
  1.     }
  2.     protected function displayWithErrorHandling(array $context, array $blocks = [])
  3.     {
  4.         try {
  5.             $this->doDisplay($context$blocks);
  6.         } catch (Error $e) {
  7.             if (!$e->getSourceContext()) {
  8.                 $e->setSourceContext($this->getSourceContext());
  9.             }
  1.         return $this->blocks;
  2.     }
  3.     public function display(array $context, array $blocks = [])
  4.     {
  5.         $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks$blocks));
  6.     }
  7.     public function render(array $context)
  8.     {
  9.         $level ob_get_level();
  1.             ob_start();
  2.         } else {
  3.             ob_start(function () { return ''; });
  4.         }
  5.         try {
  6.             $this->display($context);
  7.         } catch (\Throwable $e) {
  8.             while (ob_get_level() > $level) {
  9.                 ob_end_clean();
  10.             }
  1.      *
  2.      * @throws Error if something went wrong like a thrown exception while rendering the template
  3.      */
  4.     public function render($name, array $parameters = [])
  5.     {
  6.         return $this->load($name)->render($parameters);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      *
  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     public function render($name, array $parameters = [])
  5.     {
  6.         return $this->getEngine($name)->render($name$parameters);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      */
  1.     protected function renderView(string $view, array $parameters = []): string
  2.     {
  3.         if ($this->container->has('templating') && $this->container->get('templating')->supports($view)) {
  4.             @trigger_error('Using the "templating" service is deprecated since version 4.3 and will be removed in 5.0; use Twig instead.', \E_USER_DEPRECATED);
  5.             return $this->container->get('templating')->render($view$parameters);
  6.         }
  7.         if (!$this->container->has('twig')) {
  8.             throw new \LogicException('You can not use the "renderView" method if the Templating Component or the Twig Bundle are not available. Try running "composer require symfony/twig-bundle".');
  9.         }
  1.                 break;
  2.             default:
  3.                 $msg 'Ops, se ha producido un error en el servidor.';
  4.                 break;
  5.         }
  6.         return new Response($this->renderView('error/error.html.twig', array('code' => $code'msg' => $msg'exception' => $exception)));
  7.     }
  8.     public function error403(Request $request){
  9.         return new Response($this->renderView('error/error403.html.twig'));
  10.     }
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $exception $event->getException();
  2.         $request $this->duplicateRequest($exception$event->getRequest());
  3.         $eventDispatcher = \func_num_args() > func_get_arg(2) : null;
  4.         try {
  5.             $response $event->getKernel()->handle($requestHttpKernelInterface::SUB_REQUESTfalse);
  6.         } catch (\Exception $e) {
  7.             $f FlattenException::createFromThrowable($e);
  8.             $this->logException($esprintf('Exception thrown when handling an exception (%s: %s at %s line %s)'$f->getClass(), $f->getMessage(), $e->getFile(), $e->getLine()));
  1.         $this->called true;
  2.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  3.         $e $this->stopwatch->start($this->name'event_listener');
  4.         ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         if ($e->isStarted()) {
  6.             $e->stop();
  7.         }
  1.     {
  2.         foreach ($listeners as $listener) {
  3.             if ($event->isPropagationStopped()) {
  4.                 break;
  5.             }
  6.             $listener($event$eventName$this);
  7.         }
  8.     }
  9.     /**
  10.      * Sorts the internal list of listeners for the given event by priority.
  1.      * @param object     $event     The event object to pass to the event handlers/listeners
  2.      */
  3.     protected function callListeners(iterable $listenersstring $eventName$event)
  4.     {
  5.         if ($event instanceof Event) {
  6.             $this->doDispatch($listeners$eventName$event);
  7.             return;
  8.         }
  9.         $stoppable $event instanceof ContractsEvent || $event instanceof StoppableEventInterface;
  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.      * @throws \Exception
  2.      */
  3.     private function handleThrowable(\Throwable $eRequest $requestint $type): Response
  4.     {
  5.         $event = new ExceptionEvent($this$request$type$e);
  6.         $this->dispatcher->dispatch($eventKernelEvents::EXCEPTION);
  7.         // a listener might have replaced the exception
  8.         $e $event->getThrowable();
  9.         if (!$event->hasResponse()) {
  1.     {
  2.         if (!$request $request ?: $this->requestStack->getMasterRequest()) {
  3.             throw $exception;
  4.         }
  5.         $response $this->handleThrowable($exception$requestself::MASTER_REQUEST);
  6.         $response->sendHeaders();
  7.         $response->sendContent();
  8.         $this->terminate($request$response);
  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 /home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/error-handler/ErrorHandler.php :: Symfony\Component\HttpKernel\EventListener\{closure} (line 601)
  1.             $this->exceptionHandler null;
  2.         }
  3.         try {
  4.             if (null !== $exceptionHandler) {
  5.                 return $exceptionHandler($exception);
  6.             }
  7.             $handlerException $handlerException ?: $exception;
  8.         } catch (\Throwable $handlerException) {
  9.         }
  10.         if ($exception === $handlerException && null === $this->exceptionHandler) {
ErrorHandler->handleException()

RuntimeException

Failed to start the session because headers have already been sent by "/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-foundation/Response.php" at line 368.

  1.         if (\PHP_SESSION_ACTIVE === session_status()) {
  2.             throw new \RuntimeException('Failed to start the session: already started by PHP.');
  3.         }
  4.         if (filter_var(ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN) && headers_sent($file$line)) {
  5.             throw new \RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.'$file$line));
  6.         }
  7.         // ok to try and start the session
  8.         if (!session_start()) {
  9.             throw new \RuntimeException('Failed to start the session.');
  1.         }
  2.         if (!$this->started && $this->saveHandler->isActive()) {
  3.             $this->loadSession();
  4.         } elseif (!$this->started) {
  5.             $this->start();
  6.         }
  7.         return $this->bags[$name];
  8.     }
  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     public function getBag($name)
  5.     {
  6.         $bag $this->storage->getBag($name);
  7.         return method_exists($bag'getBag') ? $bag->getBag() : $bag;
  8.     }
  9.     /**
  1.      *
  2.      * Note that this method was added to help with IDE autocompletion.
  3.      */
  4.     private function getAttributeBag(): AttributeBagInterface
  5.     {
  6.         return $this->getBag($this->attributeName);
  7.     }
  8. }
  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     public function get($name$default null)
  5.     {
  6.         return $this->getAttributeBag()->get($name$default);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      */
  1.     }
  2.     // Some objects throw exceptions when they have __call, and the method we try
  3.     // to call is not supported. If ignoreStrictCheck is true, we should return null.
  4.     try {
  5.         $ret $object->$method(...$arguments);
  6.     } catch (\BadMethodCallException $e) {
  7.         if ($call && ($ignoreStrictCheck || !$env->isStrictVariables())) {
  8.             return;
  9.         }
  10.         throw $e;
  1.     <script type=\"text/javascript\">
  2.         \$(document).ready(function () {
  3.             ";
  4.         // line 55
  5.         if (((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["app"] ?? null), "session", [], "any"falsetruefalse55), "get", [=> "administrador"], "method"truetruefalse55) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'55$this->source); })()), "session", [], "any"falsefalsefalse55), "get", [=> "administrador"], "method"falsefalsefalse55)) || (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["app"] ?? null), "session", [], "any"falsetruefalse55), "get", [=> "grupoEmpresa"], "method"truetruefalse55) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'55$this->source); })()), "session", [], "any"falsefalsefalse55), "get", [=> "grupoEmpresa"], "method"falsefalsefalse55)))) {
  6.             // line 56
  7.             echo "                //Recuperamos las empresas
  8.                 \$.ajax({
  9.                     type: \"POST\",
  10.                     url: \"";
  1.     }
  2.     protected function displayWithErrorHandling(array $context, array $blocks = [])
  3.     {
  4.         try {
  5.             $this->doDisplay($context$blocks);
  6.         } catch (Error $e) {
  7.             if (!$e->getSourceContext()) {
  8.                 $e->setSourceContext($this->getSourceContext());
  9.             }
  1.         return $this->blocks;
  2.     }
  3.     public function display(array $context, array $blocks = [])
  4.     {
  5.         $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks$blocks));
  6.     }
  7.     public function render(array $context)
  8.     {
  9.         $level ob_get_level();
  1.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  2.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""error/error.html.twig"));
  3.         // line 1
  4.         $this->loadTemplate("theme/header.html.twig""error/error.html.twig"1)->display($context);
  5.         // line 2
  6.         echo "
  7. <body>
  8. <div class=\"page-content\">
  9.     <div class=\"content-wrapper\">
  1.     }
  2.     protected function displayWithErrorHandling(array $context, array $blocks = [])
  3.     {
  4.         try {
  5.             $this->doDisplay($context$blocks);
  6.         } catch (Error $e) {
  7.             if (!$e->getSourceContext()) {
  8.                 $e->setSourceContext($this->getSourceContext());
  9.             }
  1.         return $this->blocks;
  2.     }
  3.     public function display(array $context, array $blocks = [])
  4.     {
  5.         $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks$blocks));
  6.     }
  7.     public function render(array $context)
  8.     {
  9.         $level ob_get_level();
  1.             ob_start();
  2.         } else {
  3.             ob_start(function () { return ''; });
  4.         }
  5.         try {
  6.             $this->display($context);
  7.         } catch (\Throwable $e) {
  8.             while (ob_get_level() > $level) {
  9.                 ob_end_clean();
  10.             }
  1.      *
  2.      * @throws Error if something went wrong like a thrown exception while rendering the template
  3.      */
  4.     public function render($name, array $parameters = [])
  5.     {
  6.         return $this->load($name)->render($parameters);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      *
  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     public function render($name, array $parameters = [])
  5.     {
  6.         return $this->getEngine($name)->render($name$parameters);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      */
  1.     protected function renderView(string $view, array $parameters = []): string
  2.     {
  3.         if ($this->container->has('templating') && $this->container->get('templating')->supports($view)) {
  4.             @trigger_error('Using the "templating" service is deprecated since version 4.3 and will be removed in 5.0; use Twig instead.', \E_USER_DEPRECATED);
  5.             return $this->container->get('templating')->render($view$parameters);
  6.         }
  7.         if (!$this->container->has('twig')) {
  8.             throw new \LogicException('You can not use the "renderView" method if the Templating Component or the Twig Bundle are not available. Try running "composer require symfony/twig-bundle".');
  9.         }
  1.                 break;
  2.             default:
  3.                 $msg 'Ops, se ha producido un error en el servidor.';
  4.                 break;
  5.         }
  6.         return new Response($this->renderView('error/error.html.twig', array('code' => $code'msg' => $msg'exception' => $exception)));
  7.     }
  8.     public function error403(Request $request){
  9.         return new Response($this->renderView('error/error403.html.twig'));
  10.     }
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $exception $event->getException();
  2.         $request $this->duplicateRequest($exception$event->getRequest());
  3.         $eventDispatcher = \func_num_args() > func_get_arg(2) : null;
  4.         try {
  5.             $response $event->getKernel()->handle($requestHttpKernelInterface::SUB_REQUESTfalse);
  6.         } catch (\Exception $e) {
  7.             $f FlattenException::createFromThrowable($e);
  8.             $this->logException($esprintf('Exception thrown when handling an exception (%s: %s at %s line %s)'$f->getClass(), $f->getMessage(), $e->getFile(), $e->getLine()));
  1.         $this->called true;
  2.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  3.         $e $this->stopwatch->start($this->name'event_listener');
  4.         ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         if ($e->isStarted()) {
  6.             $e->stop();
  7.         }
  1.     {
  2.         foreach ($listeners as $listener) {
  3.             if ($event->isPropagationStopped()) {
  4.                 break;
  5.             }
  6.             $listener($event$eventName$this);
  7.         }
  8.     }
  9.     /**
  10.      * Sorts the internal list of listeners for the given event by priority.
  1.      * @param object     $event     The event object to pass to the event handlers/listeners
  2.      */
  3.     protected function callListeners(iterable $listenersstring $eventName$event)
  4.     {
  5.         if ($event instanceof Event) {
  6.             $this->doDispatch($listeners$eventName$event);
  7.             return;
  8.         }
  9.         $stoppable $event instanceof ContractsEvent || $event instanceof StoppableEventInterface;
  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.      * @throws \Exception
  2.      */
  3.     private function handleThrowable(\Throwable $eRequest $requestint $type): Response
  4.     {
  5.         $event = new ExceptionEvent($this$request$type$e);
  6.         $this->dispatcher->dispatch($eventKernelEvents::EXCEPTION);
  7.         // a listener might have replaced the exception
  8.         $e $event->getThrowable();
  9.         if (!$event->hasResponse()) {
  1.     {
  2.         if (!$request $request ?: $this->requestStack->getMasterRequest()) {
  3.             throw $exception;
  4.         }
  5.         $response $this->handleThrowable($exception$requestself::MASTER_REQUEST);
  6.         $response->sendHeaders();
  7.         $response->sendContent();
  8.         $this->terminate($request$response);
  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 /home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/error-handler/ErrorHandler.php :: Symfony\Component\HttpKernel\EventListener\{closure} (line 601)
  1.             $this->exceptionHandler null;
  2.         }
  3.         try {
  4.             if (null !== $exceptionHandler) {
  5.                 return $exceptionHandler($exception);
  6.             }
  7.             $handlerException $handlerException ?: $exception;
  8.         } catch (\Throwable $handlerException) {
  9.         }
  10.         if ($exception === $handlerException && null === $this->exceptionHandler) {
ErrorHandler->handleException()

Symfony\Component\DependencyInjection\Exception\ EnvNotFoundException

Environment variable not found: "MAILER_URL".

  1.                 }
  2.             }
  3.             if (false === $env || null === $env) {
  4.                 if (!$this->container->hasParameter("env($name)")) {
  5.                     throw new EnvNotFoundException(sprintf('Environment variable not found: "%s".'$name));
  6.                 }
  7.                 $env $this->container->getParameter("env($name)");
  8.             }
  9.         }
  1.         }
  2.         $processor $processors->has($prefix) ? $processors->get($prefix) : new EnvVarProcessor($this);
  3.         $this->resolving[$envName] = true;
  4.         try {
  5.             return $this->envCache[$name] = $processor->getEnv($prefix$localName$this->getEnv);
  6.         } finally {
  7.             unset($this->resolving[$envName]);
  8.         }
  9.     }
  1.         include_once \dirname(__DIR__4).'/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport.php';
  2.         include_once \dirname(__DIR__4).'/vendor/symfony/swiftmailer-bundle/DependencyInjection/SwiftmailerTransportFactory.php';
  3.         include_once \dirname(__DIR__4).'/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/EventDispatcher.php';
  4.         include_once \dirname(__DIR__4).'/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SimpleEventDispatcher.php';
  5.         return $this->services['swiftmailer.mailer.default.transport.real'] = \Symfony\Bundle\SwiftmailerBundle\DependencyInjection\SwiftmailerTransportFactory::createTransport(['transport' => 'smtp''url' => $this->getEnv('MAILER_URL'), 'username' => NULL'password' => NULL'host' => 'localhost''port' => NULL'timeout' => 30'source_ip' => NULL'local_domain' => NULL'encryption' => NULL'auth_mode' => NULL'command' => '/usr/sbin/sendmail -t -i''stream_options' => []], ($this->privates['router.request_context'] ?? $this->getRouter_RequestContextService()), ($this->privates['swiftmailer.mailer.default.transport.eventdispatcher'] ?? ($this->privates['swiftmailer.mailer.default.transport.eventdispatcher'] = new \Swift_Events_SimpleEventDispatcher())));
  6.     }
  7.     /**
  8.      * Gets the public 'swiftmailer.transport' shared service.
  9.      *
  1.         try {
  2.             if (isset($this->fileMap[$id])) {
  3.                 return /* self::IGNORE_ON_UNINITIALIZED_REFERENCE */ === $invalidBehavior null $this->load($this->fileMap[$id]);
  4.             } elseif (isset($this->methodMap[$id])) {
  5.                 return /* self::IGNORE_ON_UNINITIALIZED_REFERENCE */ === $invalidBehavior null $this->{$this->methodMap[$id]}();
  6.             }
  7.         } catch (\Exception $e) {
  8.             unset($this->services[$id]);
  9.             throw $e;
  1.      */
  2.     public function get($id$invalidBehavior /* self::EXCEPTION_ON_INVALID_REFERENCE */ 1)
  3.     {
  4.         $service $this->services[$id]
  5.             ?? $this->services[$id $this->aliases[$id] ?? $id]
  6.             ?? ('service_container' === $id $this : ($this->factories[$id] ?? [$this'make'])($id$invalidBehavior));
  7.         if (!\is_object($service) && null !== $service) {
  8.             @trigger_error(sprintf('Non-object services are deprecated since Symfony 4.4, please fix the "%s" service which is of type "%s" right now.'$id, \gettype($service)), \E_USER_DEPRECATED);
  9.         }
  1.                     $transport $mailer->getTransport();
  2.                     if ($transport instanceof \Swift_Transport_SpoolTransport) {
  3.                         $spool $transport->getSpool();
  4.                         if ($spool instanceof \Swift_MemorySpool) {
  5.                             try {
  6.                                 $spool->flushQueue($this->container->get(sprintf('swiftmailer.mailer.%s.transport.real'$name)));
  7.                             } catch (\Swift_TransportException $exception) {
  8.                                 if (null !== $this->logger) {
  9.                                     $this->logger->error(sprintf('Exception occurred while flushing email queue: %s'$exception->getMessage()));
  10.                                 }
  11.                             }
  1.         $this->called true;
  2.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  3.         $e $this->stopwatch->start($this->name'event_listener');
  4.         ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         if ($e->isStarted()) {
  6.             $e->stop();
  7.         }
  1.     {
  2.         foreach ($listeners as $listener) {
  3.             if ($event->isPropagationStopped()) {
  4.                 break;
  5.             }
  6.             $listener($event$eventName$this);
  7.         }
  8.     }
  9.     /**
  10.      * Sorts the internal list of listeners for the given event by priority.
  1.      * @param object     $event     The event object to pass to the event handlers/listeners
  2.      */
  3.     protected function callListeners(iterable $listenersstring $eventName$event)
  4.     {
  5.         if ($event instanceof Event) {
  6.             $this->doDispatch($listeners$eventName$event);
  7.             return;
  8.         }
  9.         $stoppable $event instanceof ContractsEvent || $event instanceof StoppableEventInterface;
  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.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     public function terminate(Request $requestResponse $response)
  5.     {
  6.         $this->dispatcher->dispatch(new TerminateEvent($this$request$response), KernelEvents::TERMINATE);
  7.     }
  8.     /**
  9.      * @internal
  10.      */
  1.         if (false === $this->booted) {
  2.             return;
  3.         }
  4.         if ($this->getHttpKernel() instanceof TerminableInterface) {
  5.             $this->getHttpKernel()->terminate($request$response);
  6.         }
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  1. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  2. $request Request::createFromGlobals();
  3. $response $kernel->handle($request);
  4. $response->send();
  5. $kernel->terminate($request$response);

Stack Traces 3

[3/3] RuntimeError

Twig\Error\RuntimeError:
An exception has been thrown during the rendering of a template ("Failed to start the session because headers have already been sent by "/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-foundation/Response.php" at line 368.").

  at /home/administrador/prevencio/prevencio-meditrauma/portal/templates/theme/header.html.twig:55
  at Twig\Template->displayWithErrorHandling()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/twig/twig/src/Template.php:378)
  at Twig\Template->display()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/var/cache/dev/twig/b1/b1ce2026be9da45eea40abe273e567743a664433b7043c3e85d33ed29b5ba3d9.php:43)
  at __TwigTemplate_684709a545636151a4cc635d21f9295cbab88f2d9dd9d8d2aad0f61459e1fea2->doDisplay()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/twig/twig/src/Template.php:405)
  at Twig\Template->displayWithErrorHandling()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/twig/twig/src/Template.php:378)
  at Twig\Template->display()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/twig/twig/src/Template.php:390)
  at Twig\Template->render()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/twig-bridge/TwigEngine.php:54)
  at Symfony\Bridge\Twig\TwigEngine->render()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/templating/DelegatingEngine.php:41)
  at Symfony\Component\Templating\DelegatingEngine->render()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/framework-bundle/Controller/ControllerTrait.php:213)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->renderView()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/src/Controller/ErrorController.php:31)
  at App\Controller\ErrorController->showAction()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-kernel/HttpKernel.php:158)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-kernel/HttpKernel.php:80)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-kernel/EventListener/ExceptionListener.php:61)
  at Symfony\Component\HttpKernel\EventListener\ExceptionListener->onKernelException()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:126)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/event-dispatcher/EventDispatcher.php:264)
  at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/event-dispatcher/EventDispatcher.php:239)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/event-dispatcher/EventDispatcher.php:73)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:168)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-kernel/HttpKernel.php:219)
  at Symfony\Component\HttpKernel\HttpKernel->handleThrowable()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-kernel/HttpKernel.php:112)
  at Symfony\Component\HttpKernel\HttpKernel->terminateWithException()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php:129)
  at Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::Symfony\Component\HttpKernel\EventListener\{closure}()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/error-handler/ErrorHandler.php:601)
  at Symfony\Component\ErrorHandler\ErrorHandler->handleException()                

[2/3] RuntimeException

RuntimeException:
Failed to start the session because headers have already been sent by "/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-foundation/Response.php" at line 368.

  at /home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:152
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:323)
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->getBag()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-foundation/Session/Session.php:251)
  at Symfony\Component\HttpFoundation\Session\Session->getBag()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-foundation/Session/Session.php:273)
  at Symfony\Component\HttpFoundation\Session\Session->getAttributeBag()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-foundation/Session/Session.php:73)
  at Symfony\Component\HttpFoundation\Session\Session->get()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/twig/twig/src/Extension/CoreExtension.php:1566)
  at twig_get_attribute()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/var/cache/dev/twig/cc/ccc1b1e9b2ef368261e68a6ba49d171bd42e752b9aee1383b11f0facb501de26.php:187)
  at __TwigTemplate_6b40ee5e97299510eb137c11c18ce9e1ca1f88ac7a49bd10b99de65001d9f758->doDisplay()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/twig/twig/src/Template.php:405)
  at Twig\Template->displayWithErrorHandling()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/twig/twig/src/Template.php:378)
  at Twig\Template->display()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/var/cache/dev/twig/b1/b1ce2026be9da45eea40abe273e567743a664433b7043c3e85d33ed29b5ba3d9.php:43)
  at __TwigTemplate_684709a545636151a4cc635d21f9295cbab88f2d9dd9d8d2aad0f61459e1fea2->doDisplay()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/twig/twig/src/Template.php:405)
  at Twig\Template->displayWithErrorHandling()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/twig/twig/src/Template.php:378)
  at Twig\Template->display()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/twig/twig/src/Template.php:390)
  at Twig\Template->render()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/twig-bridge/TwigEngine.php:54)
  at Symfony\Bridge\Twig\TwigEngine->render()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/templating/DelegatingEngine.php:41)
  at Symfony\Component\Templating\DelegatingEngine->render()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/framework-bundle/Controller/ControllerTrait.php:213)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->renderView()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/src/Controller/ErrorController.php:31)
  at App\Controller\ErrorController->showAction()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-kernel/HttpKernel.php:158)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-kernel/HttpKernel.php:80)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-kernel/EventListener/ExceptionListener.php:61)
  at Symfony\Component\HttpKernel\EventListener\ExceptionListener->onKernelException()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:126)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/event-dispatcher/EventDispatcher.php:264)
  at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/event-dispatcher/EventDispatcher.php:239)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/event-dispatcher/EventDispatcher.php:73)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:168)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-kernel/HttpKernel.php:219)
  at Symfony\Component\HttpKernel\HttpKernel->handleThrowable()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-kernel/HttpKernel.php:112)
  at Symfony\Component\HttpKernel\HttpKernel->terminateWithException()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php:129)
  at Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::Symfony\Component\HttpKernel\EventListener\{closure}()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/error-handler/ErrorHandler.php:601)
  at Symfony\Component\ErrorHandler\ErrorHandler->handleException()                

[1/3] EnvNotFoundException

Symfony\Component\DependencyInjection\Exception\EnvNotFoundException:
Environment variable not found: "MAILER_URL".

  at /home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/dependency-injection/EnvVarProcessor.php:171
  at Symfony\Component\DependencyInjection\EnvVarProcessor->getEnv()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/dependency-injection/Container.php:422)
  at Symfony\Component\DependencyInjection\Container->getEnv()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/var/cache/dev/Container6LIjCdR/srcApp_KernelDevDebugContainer.php:4714)
  at Container6LIjCdR\srcApp_KernelDevDebugContainer->getSwiftmailer_Mailer_Default_Transport_RealService()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/dependency-injection/Container.php:257)
  at Symfony\Component\DependencyInjection\Container->make()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/dependency-injection/Container.php:231)
  at Symfony\Component\DependencyInjection\Container->get()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/swiftmailer-bundle/EventListener/EmailSenderListener.php:61)
  at Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener->onTerminate()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:126)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/event-dispatcher/EventDispatcher.php:264)
  at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/event-dispatcher/EventDispatcher.php:239)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/event-dispatcher/EventDispatcher.php:73)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:168)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-kernel/HttpKernel.php:100)
  at Symfony\Component\HttpKernel\HttpKernel->terminate()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/vendor/symfony/http-kernel/Kernel.php:166)
  at Symfony\Component\HttpKernel\Kernel->terminate()
     (/home/administrador/prevencio/prevencio-meditrauma/portal/public/index.php:27)