Symfony Exception

ErrorException

HTTP 500 Internal Server Error

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

Exception

ErrorException

  1.      * @return int|false
  2.      */
  3.     #[\ReturnTypeWillChange]
  4.     public function gc($maxlifetime)
  5.     {
  6.         return $this->handler->gc($maxlifetime);
  7.     }
  8. }
  1.      * @return int|false
  2.      */
  3.     #[\ReturnTypeWillChange]
  4.     public function gc($maxlifetime)
  5.     {
  6.         return $this->handler->gc($maxlifetime);
  7.     }
  8.     /**
  9.      * @return bool
  10.      */
SessionHandlerProxy->gc()
  1.             // the session ID in the header is invalid, create a new one
  2.             session_id(session_create_id());
  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.     }
  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.      * 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 set($name$value)
  5.     {
  6.         $this->getAttributeBag()->set($name$value);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      */
Session->set() in src/Controller/BookingController.php (line 86)
  1.         $eventType $bookingService->getEventTypeObj($course$eventTypeText);
  2.         //si on ne trouve pas le type d'événement, on retourne vers la page d'accueil
  3.         if(!$eventType) return $this->redirect($this->generateUrl('home1'));
  4.         $session = new Session();
  5.         $session->set('eventTypeId'$eventType->getId());
  6.         //si la lang de la requete n'est pas la meême que celle enregistrée en session
  7.         if($request->getLocale() != $lang) {
  8.             $request->setLocale($lang);
  9.             $session->set("_locale"$lang); //enregistre la nouvelle lang en session
  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.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  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.         $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() in public/index.php (line 25)
  1.     Request::setTrustedHosts([$trustedHosts]);
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

Logs

No log messages

Stack Trace

ErrorException

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

  at vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php:116
  at Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler->gc()
     (vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php:91)
  at Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy->gc()
  at session_start()
     (vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:192)
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
     (vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:359)
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->getBag()
     (vendor/symfony/http-foundation/Session/Session.php:251)
  at Symfony\Component\HttpFoundation\Session\Session->getBag()
     (vendor/symfony/http-foundation/Session/Session.php:273)
  at Symfony\Component\HttpFoundation\Session\Session->getAttributeBag()
     (vendor/symfony/http-foundation/Session/Session.php:81)
  at Symfony\Component\HttpFoundation\Session\Session->set()
     (src/Controller/BookingController.php:86)
  at App\Controller\BookingController->tourAction()
     (vendor/symfony/http-kernel/HttpKernel.php:169)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:81)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:201)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (public/index.php:25)