Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/ues/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 2636

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/ues/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 2665
Failed to start the session because headers have already been sent by "/home/ues/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php" at line 2636. (500 Internal Server Error)

Symfony Exception

RuntimeException

HTTP 500 Internal Server Error

Failed to start the session because headers have already been sent by "/home/ues/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php" at line 2636.

Exception

RuntimeException

  1.         if (\PHP_SESSION_ACTIVE === session_status()) {
  2.             throw new \RuntimeException('Failed to start the session: already started by PHP.');
  3.         }
  4.         if (ini_get('session.use_cookies') && 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.     }
NativeSessionStorage->getBag('attributes') in vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php (line 249)
  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     public function getBag($name)
  5.     {
  6.         return $this->storage->getBag($name)->getBag();
  7.     }
  8.     /**
  9.      * Gets the flashbag interface.
  10.      *
  1.      *
  2.      * @return AttributeBagInterface
  3.      */
  4.     private function getAttributeBag()
  5.     {
  6.         return $this->getBag($this->attributeName);
  7.     }
  8. }
  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     public function has($name)
  5.     {
  6.         return $this->getAttributeBag()->has($name);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      */
Session->has('_security.last_error') in vendor/friendsofsymfony/user-bundle/Controller/SecurityController.php (line 80)
  1.         $lastUsernameKey Security::LAST_USERNAME;
  2.         // get the error if any (works with forward and redirect -- see below)
  3.         if ($request->attributes->has($authErrorKey)) {
  4.             $error $request->attributes->get($authErrorKey);
  5.         } elseif (null !== $session && $session->has($authErrorKey)) {
  6.             $error $session->get($authErrorKey);
  7.             $session->remove($authErrorKey);
  8.         } else {
  9.             $error null;
  10.         }
SecurityController->loginAction(object(Request)) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 151)
  1.         $this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS$event);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response = \call_user_func_array($controller$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new GetResponseForControllerResultEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch(KernelEvents::VIEW$event);
HttpKernel->handleRaw(object(Request), 1) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 68)
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level'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) {
HttpKernel->handle(object(Request), 1, true) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php (line 202)
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle(object(Request)) in web/app.php (line 21)
  1. //$kernel = new AppCache($kernel);
  2. // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
  3. //Request::enableHttpMethodParameterOverride();
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

Logs

No log messages

Stack Trace

RuntimeException

RuntimeException:
Failed to start the session because headers have already been sent by "/home/ues/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php" at line 2636.

  at vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php:141
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
     (vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php:302)
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->getBag('attributes')
     (vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php:249)
  at Symfony\Component\HttpFoundation\Session\Session->getBag('attributes')
     (vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php:271)
  at Symfony\Component\HttpFoundation\Session\Session->getAttributeBag()
     (vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php:65)
  at Symfony\Component\HttpFoundation\Session\Session->has('_security.last_error')
     (vendor/friendsofsymfony/user-bundle/Controller/SecurityController.php:80)
  at FOS\UserBundle\Controller\SecurityController->loginAction(object(Request))
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (web/app.php:21)