Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/tmp/.priv) 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(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.             return (string) $request->query->get('language');
  2.         }
  3.         // language was already set
  4.         if ($session->has('language') && \in_array((string) $session->get('language'), $this->installerLanguagestrue)) {
  5.             return (string) $session->get('language');
  6.         }
  7.         // get initial language from browser header
  8.         if ($request->headers->has('HTTP_ACCEPT_LANGUAGE')) {
  1.     public function setInstallerLocale(RequestEvent $event): void
  2.     {
  3.         $request $event->getRequest();
  4.         $locale $this->detectLanguage($request);
  5.         $request->attributes->set('_locale'$locale);
  6.         $request->setLocale($locale);
  7.     }
  8.     private function detectLanguage(Request $request): string
  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.     private function handleRaw(Request $requestint $type self::MAIN_REQUEST): Response
  3.     {
  4.         // request
  5.         $event = new RequestEvent($this$request$type);
  6.         $this->dispatcher->dispatch($eventKernelEvents::REQUEST);
  7.         if ($event->hasResponse()) {
  8.             return $this->filterResponse($event->getResponse(), $request$type);
  9.         }
  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 85)
  1.     }
  2. } else {
  3.     $kernel = new InstallerKernel($appEnv$debug);
  4. }
  5. $result $kernel->handle($request);
  6. if ($result instanceof Response) {
  7.     $result->send();
  8.     $kernel->terminate($request$result);
  9. } else {

Stack Trace

ErrorException
ErrorException:
Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/tmp/.priv) 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:185)
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
     (vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:352)
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->getBag()
     (vendor/symfony/http-foundation/Session/Session.php:261)
  at Symfony\Component\HttpFoundation\Session\Session->getBag()
     (vendor/symfony/http-foundation/Session/Session.php:283)
  at Symfony\Component\HttpFoundation\Session\Session->getAttributeBag()
     (vendor/symfony/http-foundation/Session/Session.php:69)
  at Symfony\Component\HttpFoundation\Session\Session->has()
     (vendor/shopware/core/Installer/Subscriber/InstallerLocaleListener.php:57)
  at Shopware\Core\Installer\Subscriber\InstallerLocaleListener->detectLanguage()
     (vendor/shopware/core/Installer/Subscriber/InstallerLocaleListener.php:40)
  at Shopware\Core\Installer\Subscriber\InstallerLocaleListener->setInstallerLocale()
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:117)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (vendor/symfony/http-kernel/HttpKernel.php:129)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (public/index.php:85)