Bienvenido

Recuperación de cuenta

Si olvidaste tu contraseña por favor introduce tu email para poder recuperar tu cuenta.

Sistema de Personal - HZN © 2025

Failed to start the session because headers have already been sent by "/home/administrador/sistemas/personal-hnzn/vendor/symfony/http-foundation/Response.php" at line 368. (500 Internal Server Error)

Symfony Exception

EnvNotFoundException RuntimeException

HTTP 500 Internal Server Error

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

Exceptions 2

RuntimeException

  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.         $sessionId $_COOKIE[session_name()] ?? null;
  8.         if ($sessionId && $this->saveHandler instanceof AbstractProxy && 'files' === $this->saveHandler->getSaveHandlerName() && !preg_match('/^[a-zA-Z0-9,-]{22,}$/'$sessionId)) {
  9.             // the session ID in the header is invalid, create a new one
  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.      * @return FlashBagInterface
  3.      */
  4.     public function getFlashBag()
  5.     {
  6.         return $this->getBag($this->flashName);
  7.     }
  8.     /**
  9.      * Gets the attributebag interface.
  10.      *
  1.     {
  2.         if (!$this->container->has('session')) {
  3.             throw new \LogicException('You can not use the addFlash method if sessions are disabled. Enable them in "config/packages/framework.yaml".');
  4.         }
  5.         $this->container->get('session')->getFlashBag()->add($type$message);
  6.     }
  7.     /**
  8.      * Checks if the attributes are granted against the current authentication token and optionally supplied subject.
  9.      *
  1.                     break;
  2.                 case '403':
  3.                     $this->addFlash("error"$translator->trans($exception->getMessage()));
  4.                     break;
  5.                 default:
  6.                     $this->addFlash("error"$translator->trans('Se produjo un error %error% en caso de persistir comunicarse con un administrador.',['%error%' => $error]));
  7.             }
  8.         }catch (Exception $e){
  9.             $this->addFlash("danger"$e);
  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/sistemas/personal-hnzn/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.      *
in /home/administrador/sistemas/personal-hnzn/vendor/symfony/dependency-injection/Container.php -> getSwiftmailer_Mailer_Default_Transport_RealService (line 257)
  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 2

[2/2] RuntimeException

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

  at /home/administrador/sistemas/personal-hnzn/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:152
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
     (/home/administrador/sistemas/personal-hnzn/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:329)
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->getBag()
     (/home/administrador/sistemas/personal-hnzn/vendor/symfony/http-foundation/Session/Session.php:251)
  at Symfony\Component\HttpFoundation\Session\Session->getBag()
     (/home/administrador/sistemas/personal-hnzn/vendor/symfony/http-foundation/Session/Session.php:263)
  at Symfony\Component\HttpFoundation\Session\Session->getFlashBag()
     (/home/administrador/sistemas/personal-hnzn/vendor/symfony/framework-bundle/Controller/ControllerTrait.php:165)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->addFlash()
     (/home/administrador/sistemas/personal-hnzn/src/Controller/ErrorController.php:78)
  at App\Controller\ErrorController->show()
     (/home/administrador/sistemas/personal-hnzn/vendor/symfony/http-kernel/HttpKernel.php:158)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (/home/administrador/sistemas/personal-hnzn/vendor/symfony/http-kernel/HttpKernel.php:80)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (/home/administrador/sistemas/personal-hnzn/vendor/symfony/http-kernel/EventListener/ExceptionListener.php:61)
  at Symfony\Component\HttpKernel\EventListener\ExceptionListener->onKernelException()
     (/home/administrador/sistemas/personal-hnzn/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:126)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (/home/administrador/sistemas/personal-hnzn/vendor/symfony/event-dispatcher/EventDispatcher.php:264)
  at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch()
     (/home/administrador/sistemas/personal-hnzn/vendor/symfony/event-dispatcher/EventDispatcher.php:239)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (/home/administrador/sistemas/personal-hnzn/vendor/symfony/event-dispatcher/EventDispatcher.php:73)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (/home/administrador/sistemas/personal-hnzn/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:168)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (/home/administrador/sistemas/personal-hnzn/vendor/symfony/http-kernel/HttpKernel.php:219)
  at Symfony\Component\HttpKernel\HttpKernel->handleThrowable()
     (/home/administrador/sistemas/personal-hnzn/vendor/symfony/http-kernel/HttpKernel.php:112)
  at Symfony\Component\HttpKernel\HttpKernel->terminateWithException()
     (/home/administrador/sistemas/personal-hnzn/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php:129)
  at Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::Symfony\Component\HttpKernel\EventListener\{closure}()
     (/home/administrador/sistemas/personal-hnzn/vendor/symfony/error-handler/ErrorHandler.php:601)
  at Symfony\Component\ErrorHandler\ErrorHandler->handleException()                

[1/2] EnvNotFoundException

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

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