Symfony Exception

ContextErrorException

HTTP 500 Internal Server Error

Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php/sessions) failed: Permission denied (13)

Exception

Symfony\Component\Debug\Exception\ ContextErrorException

  1.     /**
  2.      * @return bool
  3.      */
  4.     public function gc($maxlifetime)
  5.     {
  6.         return $this->handler->gc($maxlifetime);
  7.     }
  8. }
  1.     /**
  2.      * @return bool
  3.      */
  4.     public function gc($maxlifetime)
  5.     {
  6.         return (bool) $this->handler->gc($maxlifetime);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      */
SessionHandlerProxy->gc(3600)
  1.         if (filter_var(ini_get('session.use_cookies'), FILTER_VALIDATE_BOOLEAN) && headers_sent($file$line)) {
  2.             throw new \RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.'$file$line));
  3.         }
  4.         // ok to try and start the session
  5.         if (!session_start()) {
  6.             throw new \RuntimeException('Failed to start the session.');
  7.         }
  8.         if (null !== $this->emulateSameSite) {
  9.             $originalCookie SessionUtils::popSessionCookie(session_name(), session_id());
  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('flashes') in vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php (line 256)
  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.      *
Session->getFlashBag() in src/FrontBundle/Controller/DisplayController.php (line 250)
  1.         if ((($this->container->getParameter('instance')['object']['type_id'] != '' && $this->container->getParameter('instance')['object']['type_id'] != $object->getType()->getId())) or (($this->container->getParameter('instance')['group']['id'] != '' && ! in_array($this->container->getParameter('instance')['group']['id'], $object->getGroupesIds()))))
  2.             return $this->redirect($this->generateUrl('homepage'));
  3.         $session $request->getSession();
  4.         $session->getFlashBag()->add('achievement', array(
  5.             'title' => 'Amateur',
  6.             'description' => 'Voir 1 notice'
  7.         ));
  8.         if (! $this->get('security.authorization_checker')->isGranted('ROLE_USER') && $object->getStatus() != ObjectBibale::STATUS_VALID)
DisplayController->viewAction(object(Request), object(ObjectBibale), null) 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', (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) {
HttpKernel->handle(object(Request), 1, true) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php (line 200)
  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/personne.php (line 29)
  1. $kernel = new AppKernel('personne'true);
  2. if (PHP_VERSION_ID 70000) {
  3.     $kernel->loadClassCache();
  4. }
  5. $request Request::createFromGlobals();
  6. $response $kernel->handle($request);
  7. $response->send();
  8. $kernel->terminate($request$response);
  9.     

Logs

No log messages

Stack Trace

ContextErrorException

Symfony\Component\Debug\Exception\ContextErrorException:
Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php/sessions) failed: Permission denied (13)

  at vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/StrictSessionHandler.php:101
  at Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler->gc(3600)
     (vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php:83)
  at Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy->gc(3600)
  at session_start()
     (vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php:154)
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
     (vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php:321)
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->getBag('flashes')
     (vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php:256)
  at Symfony\Component\HttpFoundation\Session\Session->getBag('flashes')
     (vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php:268)
  at Symfony\Component\HttpFoundation\Session\Session->getFlashBag()
     (src/FrontBundle/Controller/DisplayController.php:250)
  at FrontBundle\Controller\DisplayController->viewAction(object(Request), object(ObjectBibale), null)
     (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:200)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (web/personne.php:29)