ass="loading blue">
{
bec france - dévis personalisé Dévis personalisé
bec france - email voyagescolaire@becfrance.com
bec france - 01 84 74 66 66 01 84 74 66 66
}

Créer mon voyage personnalisé

Failed to start the session because headers have already been sent by "/var/www/html/becfrance/vendor/symfony/http-foundation/Response.php" at line 381. (500 Internal Server Error)

Symfony Exception

ErrorException RuntimeException

HTTP 500 Internal Server Error

Failed to start the session because headers have already been sent by "/var/www/html/becfrance/vendor/symfony/http-foundation/Response.php" at line 381.

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.         // 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(string $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 has(string $name)
  5.     {
  6.         return $this->getAttributeBag()->has($name);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      */
  1.                 'values' => '%' $request->attributes->get('_route') . '%'
  2.             ])
  3.             ->getQuery()->getResult();
  4.         $request->attributes->set('_p_options'$result);
  5.         if (!$this->session->has('enabledCategories')) {
  6.             $enabledCategories $this->searchService->findCategories(array(
  7.                 'hydrationMode' => 2
  8.                 /**HYDRATE_ARRAY  */
  9.                 'groupBy' => ['fieldName' => 'name']
  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.         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.         if (false === $controller $this->resolver->getController($request)) {
  2.             throw new NotFoundHttpException(sprintf('Unable to find the controller for path "%s". The route is wrongly configured.'$request->getPathInfo()));
  3.         }
  4.         $event = new ControllerEvent($this$controller$request$type);
  5.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER);
  6.         $controller $event->getController();
  7.         // controller arguments
  8.         $arguments $this->argumentResolver->getArguments($request$controller);
  1.     public function handle(Request $requestint $type HttpKernelInterface::MASTER_REQUESTbool $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->getThrowable();
  2.         $request $this->duplicateRequest($exception$event->getRequest());
  3.         try {
  4.             $response $event->getKernel()->handle($requestHttpKernelInterface::SUB_REQUESTfalse);
  5.         } catch (\Exception $e) {
  6.             $f FlattenException::createFromThrowable($e);
  7.             $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.         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.      * @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 /var/www/html/becfrance/vendor/symfony/error-handler/ErrorHandler.php :: Symfony\Component\HttpKernel\EventListener\{closure} (line 594)
  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()

ErrorException

Warning: fopen(/var/www/html/becfrance/var/cache/dev/profiler/index.csv): failed to open stream: No such file or directory

  1.             return false;
  2.         }
  3.         if (!$profileIndexed) {
  4.             // Add to index
  5.             if (false === $file fopen($this->getIndexFilename(), 'a')) {
  6.                 return false;
  7.             }
  8.             fputcsv($file, [
  9.                 $profile->getToken(),
  1.             if ($collector instanceof LateDataCollectorInterface) {
  2.                 $collector->lateCollect();
  3.             }
  4.         }
  5.         if (!($ret $this->storage->write($profile)) && null !== $this->logger) {
  6.             $this->logger->warning('Unable to store the profiler information.', ['configured_storage' => \get_class($this->storage)]);
  7.         }
  8.         return $ret;
  9.     }
  1.             }
  2.         }
  3.         // save profiles
  4.         foreach ($this->profiles as $request) {
  5.             $this->profiler->saveProfile($this->profiles[$request]);
  6.         }
  7.         $this->profiles = new \SplObjectStorage();
  8.         $this->parents = new \SplObjectStorage();
  9.     }
  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.         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.     /**
  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}
Kernel->terminate() in /var/www/html/becfrance/public/index.php (line 28)
  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 "/var/www/html/becfrance/vendor/symfony/http-foundation/Response.php" at line 381.

  at /var/www/html/becfrance/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:152
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
     (/var/www/html/becfrance/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:323)
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->getBag()
     (/var/www/html/becfrance/vendor/symfony/http-foundation/Session/Session.php:257)
  at Symfony\Component\HttpFoundation\Session\Session->getBag()
     (/var/www/html/becfrance/vendor/symfony/http-foundation/Session/Session.php:279)
  at Symfony\Component\HttpFoundation\Session\Session->getAttributeBag()
     (/var/www/html/becfrance/vendor/symfony/http-foundation/Session/Session.php:67)
  at Symfony\Component\HttpFoundation\Session\Session->has()
     (/var/www/html/becfrance/src/EventSubscriber/ControllerListener.php:46)
  at App\EventSubscriber\ControllerListener->handleRequest()
     (/var/www/html/becfrance/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:117)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (/var/www/html/becfrance/vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (/var/www/html/becfrance/vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (/var/www/html/becfrance/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:151)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (/var/www/html/becfrance/vendor/symfony/http-kernel/HttpKernel.php:145)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (/var/www/html/becfrance/vendor/symfony/http-kernel/HttpKernel.php:79)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (/var/www/html/becfrance/vendor/symfony/http-kernel/EventListener/ErrorListener.php:60)
  at Symfony\Component\HttpKernel\EventListener\ErrorListener->onKernelException()
     (/var/www/html/becfrance/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:117)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (/var/www/html/becfrance/vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (/var/www/html/becfrance/vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (/var/www/html/becfrance/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:151)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (/var/www/html/becfrance/vendor/symfony/http-kernel/HttpKernel.php:218)
  at Symfony\Component\HttpKernel\HttpKernel->handleThrowable()
     (/var/www/html/becfrance/vendor/symfony/http-kernel/HttpKernel.php:111)
  at Symfony\Component\HttpKernel\HttpKernel->terminateWithException()
     (/var/www/html/becfrance/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php:118)
  at Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::Symfony\Component\HttpKernel\EventListener\{closure}()
     (/var/www/html/becfrance/vendor/symfony/error-handler/ErrorHandler.php:594)
  at Symfony\Component\ErrorHandler\ErrorHandler->handleException()                

[1/2] ErrorException

ErrorException:
Warning: fopen(/var/www/html/becfrance/var/cache/dev/profiler/index.csv): failed to open stream: No such file or directory

  at /var/www/html/becfrance/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php:181
  at Symfony\Component\HttpKernel\Profiler\FileProfilerStorage->write()
     (/var/www/html/becfrance/vendor/symfony/http-kernel/Profiler/Profiler.php:101)
  at Symfony\Component\HttpKernel\Profiler\Profiler->saveProfile()
     (/var/www/html/becfrance/vendor/symfony/http-kernel/EventListener/ProfilerListener.php:112)
  at Symfony\Component\HttpKernel\EventListener\ProfilerListener->onKernelTerminate()
     (/var/www/html/becfrance/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:117)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (/var/www/html/becfrance/vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (/var/www/html/becfrance/vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (/var/www/html/becfrance/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:151)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (/var/www/html/becfrance/vendor/symfony/http-kernel/HttpKernel.php:99)
  at Symfony\Component\HttpKernel\HttpKernel->terminate()
     (/var/www/html/becfrance/vendor/symfony/http-kernel/Kernel.php:152)
  at Symfony\Component\HttpKernel\Kernel->terminate()
     (/var/www/html/becfrance/public/index.php:28)