"data2ui/images/moon/1.svg"
 "data2ui/images/moon/1.svg"
 "data2ui/images/moon/2.svg"
 "data2ui/images/moon/2.svg"
 "data2ui/images/moon/2.svg"
 "data2ui/images/moon/2.svg"
 "data2ui/images/moon/3.svg"
 "data2ui/images/moon/3.svg"
 "data2ui/images/moon/3.svg"
 "data2ui/images/moon/3.svg"
 "data2ui/images/moon/4.svg"
 "data2ui/images/moon/4.svg"
 "data2ui/images/moon/4.svg"
 "data2ui/images/moon/4.svg"
 "data2ui/images/moon/1.svg"
 "data2ui/images/moon/1.svg"
 "data2ui/images/moon/1.svg"
 "data2ui/images/moon/1.svg"
Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent (500 Internal Server Error)

Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent

Exception

ErrorException

Show exception properties
ErrorException {#1010
  #severity: E_WARNING
}
  1.         if ($baseDir && !is_dir($baseDir) && !@mkdir($baseDir0777true) && !is_dir($baseDir)) {
  2.             throw new \RuntimeException(\sprintf('Session Storage was not able to create directory "%s".'$baseDir));
  3.         }
  4.         if ($savePath !== \ini_get('session.save_path')) {
  5.             ini_set('session.save_path'$savePath);
  6.         }
  7.         if ('files' !== \ini_get('session.save_handler')) {
  8.             ini_set('session.save_handler''files');
  9.         }
  10.     }
  1.     {
  2.         include_once \dirname(__DIR__4).'/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php';
  3.         include_once \dirname(__DIR__4).'/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php';
  4.         include_once \dirname(__DIR__4).'/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php';
  5.         return $container->privates['session.handler.native_file'] = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler(new \Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler(($container->targetDir.''.'/sessions')));
  6.     }
  7. }
  1.             $file .= '.php';
  2.         }
  3.         $service = require $this->containerDir.\DIRECTORY_SEPARATOR.$file;
  4.         return class_exists($classfalse) ? $class::do($this$lazyLoad) : $service;
  5.     }
  6.     protected function createProxy($class\Closure $factory)
  7.     {
  8.         class_exists($classfalse) || require __DIR__.'/'.$class.'.php';
  1.         if (isset($container->privates['session.factory'])) {
  2.             return $container->privates['session.factory'];
  3.         }
  4.         $instance = new \Symfony\Component\HttpFoundation\Session\SessionFactory(($container->services['request_stack'] ??= new \Symfony\Component\HttpFoundation\RequestStack()), new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorageFactory($container->parameters['session.storage.options'], ($container->privates['session.handler.native_file'] ?? $container->load('getSession_Handler_NativeFileService')), new \Symfony\Component\HttpFoundation\Session\Storage\MetadataBag('_sf2_meta'0), true), [$a'onSessionUsage']);
  5.         if (isset($container->privates['session.factory'])) {
  6.             return $container->privates['session.factory'];
  7.         }
  1.             $file .= '.php';
  2.         }
  3.         $service = require $this->containerDir.\DIRECTORY_SEPARATOR.$file;
  4.         return class_exists($classfalse) ? $class::do($this$lazyLoad) : $service;
  5.     }
  6.     protected function createProxy($class\Closure $factory)
  7.     {
  8.         class_exists($classfalse) || require __DIR__.'/'.$class.'.php';
  1.         }
  2.         if (null === $method) {
  3.             return false !== $registry $this->{$registry}[$id] ?? null null;
  4.         }
  5.         if (false !== $registry) {
  6.             return $this->{$registry}[$id] ??= $load $this->load($method) : $this->{$method}($this);
  7.         }
  8.         if (!$load) {
  9.             return $this->{$method}($this);
  10.         }
  1.     public function get(string $id): mixed
  2.     {
  3.         return match (\count($this->serviceMap[$id] ?? [])) {
  4.             => parent::get($id),
  5.             => $this->serviceMap[$id][0],
  6.             default => ($this->factory)(...$this->serviceMap[$id]),
  7.         };
  8.     }
  9.     public function getProvidedServices(): array
  10.     {
  1. class SessionListener extends AbstractSessionListener
  2. {
  3.     protected function getSession(): ?SessionInterface
  4.     {
  5.         if ($this->container->has('session_factory')) {
  6.             return $this->container->get('session_factory')->createSession();
  7.         }
  8.         return null;
  9.     }
  10. }
  1.             $request->setSessionFactory(function () use ($request) {
  2.                 // Prevent calling `$this->getSession()` twice in case the Request (and the below factory) is cloned
  3.                 static $sess;
  4.                 if (!$sess) {
  5.                     $sess $this->getSession();
  6.                     $request->setSession($sess);
  7.                     /*
  8.                      * For supporting sessions in php runtime with runners like roadrunner or swoole, the session
  9.                      * cookie needs to be read from the cookie bag and set on the session storage.
in vendor/symfony/http-foundation/Request.php -> Symfony\Component\HttpKernel\EventListener\{closure} (line 748)
  1.      */
  2.     public function getSession(): SessionInterface
  3.     {
  4.         $session $this->session;
  5.         if (!$session instanceof SessionInterface && null !== $session) {
  6.             $this->setSession($session $session());
  7.         }
  8.         if (null === $session) {
  9.             throw new SessionNotFoundException('Session has not been set.');
  10.         }
  1.      * previous requests.
  2.      */
  3.     public function hasPreviousSession(): bool
  4.     {
  5.         // the check for $this->session avoids malicious users trying to fake a session cookie with proper name
  6.         return $this->hasSession() && $this->cookies->has($this->getSession()->getName());
  7.     }
  8.     /**
  9.      * Whether the request contains a Session object.
  10.      *
  1.             $this->dispatcher->addListener(KernelEvents::RESPONSE$this->onKernelResponse(...));
  2.             $this->registered true;
  3.         }
  4.         $request $event->getRequest();
  5.         $session $request->hasPreviousSession() ? $request->getSession() : null;
  6.         $request->attributes->set('_security_firewall_run'$this->sessionKey);
  7.         if (null !== $session) {
  8.             $usageIndexValue $session instanceof Session $usageIndexReference = &$session->getUsageIndex() : 0;
  1.     public function authenticate(RequestEvent $event): void
  2.     {
  3.         $startTime microtime(true);
  4.         try {
  5.             $this->listener->authenticate($event);
  6.         } catch (LazyResponseException $e) {
  7.             $this->response $e->getResponse();
  8.             throw $e;
  9.         } finally {
  1.         }
  2.         $this->tokenStorage->setInitializer(function () use ($event$listeners) {
  3.             $event = new LazyResponseEvent($event);
  4.             foreach ($listeners as $listener) {
  5.                 $listener($event);
  6.             }
  7.         });
  8.     }
  9. }
in vendor/symfony/security-core/Authentication/Token/Storage/TokenStorage.php -> Symfony\Bundle\SecurityBundle\Security\{closure} (line 34)
  1.     public function getToken(): ?TokenInterface
  2.     {
  3.         if ($initializer $this->initializer) {
  4.             $this->initializer null;
  5.             $initializer();
  6.         }
  7.         return $this->token;
  8.     }
  1.         if ($this->shouldTrackUsage()) {
  2.             // increments the internal session usage index
  3.             $this->getSession()->getMetadataBag();
  4.         }
  5.         return $this->storage->getToken();
  6.     }
  7.     public function setToken(?TokenInterface $token null): void
  8.     {
  9.         $this->storage->setToken($token);
  1.         $this->accessDecisionManager $accessDecisionManager;
  2.     }
  3.     final public function isGranted(mixed $attributemixed $subject null): bool
  4.     {
  5.         $token $this->tokenStorage->getToken();
  6.         if (!$token || !$token->getUser()) {
  7.             $token = new NullToken();
  8.         }
  1.     {
  2.         if (!$this->container->has('security.authorization_checker')) {
  3.             throw new \LogicException('The SecurityBundle is not registered in your application. Try running "composer require symfony/security-bundle".');
  4.         }
  5.         return $this->container->get('security.authorization_checker')->isGranted($attribute$subject);
  6.     }
  7.     /**
  8.      * Throws an exception unless the attribute is granted against the current authentication token and optionally
  9.      * supplied subject.
AbstractController->isGranted() in src/Controller/ForecastController.php (line 432)
  1.             'data2ui_forecast_city' => $city,
  2.             'data2ui_forecast_city_name' => $city->getName(),
  3.             'data2ui_forecast_city_insee' => $city->getInsee(),
  4.             'data2ui_forecast_city_name_url' => $city->getNameURL(),
  5.             'data2ui_forecast_city_base_url' => $this->generateUrl('forecast_city_public'),
  6.             'is_agri' => $this->isGranted('ROLE_AGRI'),
  7.         ]);
  8.     }
  9.     #[Route(
  10.         path'/resumes/ville/{city}.json',
ForecastController->doGetForecastForCity() in src/Controller/ForecastController.php (line 321)
  1.         Data2uiForecastController $data2uiForecastController,
  2.         #[ValueResolver(\App\HttpKernel\ArgumentResolver\CityValueResolver::class)] ?City $city null,
  3.         int $day 0,
  4.         ?int $period null
  5.     ): Response {
  6.         return $this->doGetForecastForCity($request$data2uiForecastController$day$period'public'$city);
  7.     }
  8.     #[Route(
  9.         path'/agriculture/ville/{city}/{day}/{period}',
  10.         name'forecast_city_farmer',
in vendor/symfony/http-kernel/HttpKernel.php -> getForecastForCityGeneric (line 181)
  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$event);
  9.             $this->dispatcher->dispatch($eventKernelEvents::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.         if (!$this->handlingHttpCache) {
  2.             $this->resetServices true;
  3.         }
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
  1.     ) {
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         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('/srv/web-meteobretagne2025/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. date_default_timezone_set('Europe/Paris');
  5. return function (array $context) {
  6.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);

Stack Trace

ErrorException
ErrorException:
Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent

  at vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php:49
  at Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler->__construct()
     (var/cache/prod/ContainerAbYlAq4/getSession_Handler_NativeFileService.php:25)
  at ContainerAbYlAq4\getSession_Handler_NativeFileService::do()
     (var/cache/prod/ContainerAbYlAq4/App_KernelProdDebugContainer.php:458)
  at ContainerAbYlAq4\App_KernelProdDebugContainer->load()
     (var/cache/prod/ContainerAbYlAq4/getSession_FactoryService.php:34)
  at ContainerAbYlAq4\getSession_FactoryService::do()
     (var/cache/prod/ContainerAbYlAq4/App_KernelProdDebugContainer.php:458)
  at ContainerAbYlAq4\App_KernelProdDebugContainer->load()
     (vendor/symfony/dependency-injection/Container.php:404)
  at Symfony\Component\DependencyInjection\Container->getService()
     (vendor/symfony/dependency-injection/Argument/ServiceLocator.php:40)
  at Symfony\Component\DependencyInjection\Argument\ServiceLocator->get()
     (vendor/symfony/http-kernel/EventListener/SessionListener.php:28)
  at Symfony\Component\HttpKernel\EventListener\SessionListener->getSession()
     (vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php:81)
  at Symfony\Component\HttpKernel\EventListener\AbstractSessionListener->Symfony\Component\HttpKernel\EventListener\{closure}()
     (vendor/symfony/http-foundation/Request.php:748)
  at Symfony\Component\HttpFoundation\Request->getSession()
     (vendor/symfony/http-foundation/Request.php:765)
  at Symfony\Component\HttpFoundation\Request->hasPreviousSession()
     (vendor/symfony/security-http/Firewall/ContextListener.php:90)
  at Symfony\Component\Security\Http\Firewall\ContextListener->authenticate()
     (vendor/symfony/security-bundle/Debug/WrappedLazyListener.php:46)
  at Symfony\Bundle\SecurityBundle\Debug\WrappedLazyListener->authenticate()
     (vendor/symfony/security-bundle/Security/LazyFirewallContext.php:73)
  at Symfony\Bundle\SecurityBundle\Security\LazyFirewallContext->Symfony\Bundle\SecurityBundle\Security\{closure}()
     (vendor/symfony/security-core/Authentication/Token/Storage/TokenStorage.php:34)
  at Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage->getToken()
     (vendor/symfony/security-core/Authentication/Token/Storage/UsageTrackingTokenStorage.php:44)
  at Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage->getToken()
     (vendor/symfony/security-core/Authorization/AuthorizationChecker.php:42)
  at Symfony\Component\Security\Core\Authorization\AuthorizationChecker->isGranted()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:209)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->isGranted()
     (src/Controller/ForecastController.php:432)
  at App\Controller\ForecastController->doGetForecastForCity()
     (src/Controller/ForecastController.php:321)
  at App\Controller\ForecastController->getForecastForCityGeneric()
     (vendor/symfony/http-kernel/HttpKernel.php:181)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:76)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:208)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (vendor/autoload_runtime.php:29)
  at require_once('/srv/web-meteobretagne2025/vendor/autoload_runtime.php')
     (public/index.php:5)