Symfony Exception

ErrorException

HTTP 500 Internal Server Error

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

Exception

ErrorException

  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.      * @return bool
  10.      */
SessionHandlerProxy->gc(1440)
  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.     }
  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 set(string $name$value)
  5.     {
  6.         $this->getAttributeBag()->set($name$value);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      */
  1.      *
  2.      * Usually, you do not need to set this directly.
  3.      */
  4.     private function saveTargetPath(SessionInterface $sessionstring $firewallNamestring $uri)
  5.     {
  6.         $session->set('_security.'.$firewallName.'.target_path'$uri);
  7.     }
  8.     /**
  9.      * Returns the URL (if any) the user visited that forced them to login.
  10.      */
RequestSubscriber->saveTargetPath(object(Session), 'main', 'https://kvkk.kucukhuyuk.bel.tr/ilgili-3kisiler-icin-aydinlatma-metni') in src/Subscriber/EventSubscriber/Request/RequestSubscriber.php (line 36)
  1.             || AppAuthenticator::LOGIN_ROUTE === $request->attributes->get('_route')
  2.         ) {
  3.             return;
  4.         }
  5.         $this->saveTargetPath($this->session'main'$request->getUri());
  6.     }
  7.     public static function getSubscribedEvents()
  8.     {
  9.         return [
  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.         $this->requestStack->push($request);
  3.         // request
  4.         $event = new RequestEvent($this$request$type);
  5.         $this->dispatcher->dispatch($eventKernelEvents::REQUEST);
  6.         if ($event->hasResponse()) {
  7.             return $this->filterResponse($event->getResponse(), $request$type);
  8.         }
  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.         $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 public/index.php (line 28)
  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/session) failed: Permission denied (13)

  at vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php:101
  at Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler->gc(1440)
     (vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php:83)
  at Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy->gc(1440)
  at session_start()
     (vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:156)
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
     (vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:323)
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->getBag('attributes')
     (vendor/symfony/http-foundation/Session/Session.php:257)
  at Symfony\Component\HttpFoundation\Session\Session->getBag('attributes')
     (vendor/symfony/http-foundation/Session/Session.php:279)
  at Symfony\Component\HttpFoundation\Session\Session->getAttributeBag()
     (vendor/symfony/http-foundation/Session/Session.php:83)
  at Symfony\Component\HttpFoundation\Session\Session->set('_security.main.target_path', 'https://kvkk.kucukhuyuk.bel.tr/ilgili-3kisiler-icin-aydinlatma-metni')
     (vendor/symfony/security-http/Util/TargetPathTrait.php:28)
  at App\Subscriber\EventSubscriber\Request\RequestSubscriber->saveTargetPath(object(Session), 'main', 'https://kvkk.kucukhuyuk.bel.tr/ilgili-3kisiler-icin-aydinlatma-metni')
     (src/Subscriber/EventSubscriber/Request/RequestSubscriber.php:36)
  at App\Subscriber\EventSubscriber\Request\RequestSubscriber->onKernelRequest(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:117)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(RequestEvent))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(RequestEvent), 'kernel.request')
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:151)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(RequestEvent), 'kernel.request')
     (vendor/symfony/http-kernel/HttpKernel.php:133)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:79)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:195)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (public/index.php:28)