if ($baseDir && !is_dir($baseDir) && !@mkdir($baseDir, 0777, true) && !is_dir($baseDir)) { throw new \RuntimeException(sprintf('Session Storage was not able to create directory "%s".', $baseDir)); } if ($savePath !== \ini_get('session.save_path')) { ini_set('session.save_path', $savePath); } if ('files' !== \ini_get('session.save_handler')) { ini_set('session.save_handler', 'files'); } } if (isset($container->privates['session.factory'])) { return $container->privates['session.factory']; } return $container->privates['session.factory'] = new \Symfony\Component\HttpFoundation\Session\SessionFactory(($container->services['request_stack'] ?? ($container->services['request_stack'] = new \Symfony\Component\HttpFoundation\RequestStack())), new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorageFactory($container->parameters['session.storage.options'], new \Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler(new \Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler($container->getEnv('string:default:app_session_save_path:SESSION_SAVE_PATH'))), new \Symfony\Component\HttpFoundation\Session\Storage\MetadataBag('_sf2_meta', 0), false), [0 => $a, 1 => 'onSessionUsage']); }} $file .= '.php'; } $service = require $this->containerDir.\DIRECTORY_SEPARATOR.$file; return class_exists($class, false) ? $class::do($this, $lazyLoad) : $service; } /** * Gets the public '.container.private.security.authorization_checker' shared service. * public static function do($container, $lazyLoad = true) { include_once \dirname(__DIR__, 4).'/vendor/symfony/http-foundation/Session/SessionInterface.php'; include_once \dirname(__DIR__, 4).'/vendor/symfony/http-foundation/Session/Session.php'; $a = ($container->privates['session.factory'] ?? $container->load('getSession_FactoryService')); if (isset($container->services['.container.private.session'])) { return $container->services['.container.private.session']; } $file .= '.php'; } $service = require $this->containerDir.\DIRECTORY_SEPARATOR.$file; return class_exists($class, false) ? $class::do($this, $lazyLoad) : $service; } /** * Gets the public '.container.private.security.authorization_checker' shared service. * } if (null === $method) { return false !== $registry ? $this->{$registry}[$id] ?? null : null; } if (false !== $registry) { return $this->{$registry}[$id] ?? $this->{$registry}[$id] = $load ? $this->load($method) : $this->{$method}(); } if (!$load) { return $this->{$method}(); } * * @return mixed */ public function get(string $id) { return isset($this->serviceMap[$id]) ? ($this->factory)(...$this->serviceMap[$id]) : parent::get($id); } /** * {@inheritdoc} */ } protected function getSession(): ?SessionInterface { if ($this->container->has('session')) { return $this->container->get('session'); } if ($this->container->has('session_factory')) { return $this->container->get('session_factory')->createSession(); } if (!$request->hasSession()) { // This variable prevents calling `$this->getSession()` twice in case the Request (and the below factory) is cloned $sess = null; $request->setSessionFactory(function () use (&$sess, $request) { if (!$sess) { $sess = $this->getSession(); $request->setSession($sess); /* * For supporting sessions in php runtime with runners like roadrunner or swoole, the session * cookie needs to be read from the cookie bag and set on the session storage. */ public function getSession() { $session = $this->session; if (!$session instanceof SessionInterface && null !== $session) { $this->setSession($session = $session()); } if (null === $session) { throw new SessionNotFoundException('Session has not been set.'); } * @return bool */ public function hasPreviousSession() { // the check for $this->session avoids malicious users trying to fake a session cookie with proper name return $this->hasSession() && $this->cookies->has($this->getSession()->getName()); } /** * Whether the request contains a Session object. * $this->dispatcher->addListener(KernelEvents::RESPONSE, [$this, 'onKernelResponse']); $this->registered = true; } $request = $event->getRequest(); $session = $request->hasPreviousSession() && $request->hasSession() ? $request->getSession() : null; $request->attributes->set('_security_firewall_run', $this->sessionKey); if (null !== $session) { $usageIndexValue = $session instanceof Session ? $usageIndexReference = &$session->getUsageIndex() : 0; public function authenticate(RequestEvent $event) { $startTime = microtime(true); try { $ret = $this->listener->authenticate($event); } catch (LazyResponseException $e) { $this->response = $e->getResponse(); throw $e; } finally {abstract class AbstractListener implements FirewallListenerInterface{ final public function __invoke(RequestEvent $event) { if (false !== $this->supports($event->getRequest())) { $this->authenticate($event); } } public static function getPriority(): int { }, $listener, FirewallContext::class)(); $listener($event); } else { $wrappedListener = $listener instanceof FirewallListenerInterface ? new WrappedLazyListener($listener) : new WrappedListener($listener); $wrappedListener($event); $wrappedListeners[] = $wrappedListener->getInfo(); if (!$authenticatorManagerListener && $listener instanceof TraceableAuthenticatorManagerListener) { $authenticatorManagerListener = $listener; } } if (null !== $logoutListener) { yield $logoutListener; } }; $this->callListeners($event, $authenticationListeners()); } public function onKernelFinishRequest(FinishRequestEvent $event) { $request = $event->getRequest(); $this->priority = $dispatcher->getListenerPriority($eventName, $this->listener); $e = $this->stopwatch->start($this->name, 'event_listener'); try { ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher); } finally { if ($e->isStarted()) { $e->stop(); } } foreach ($listeners as $listener) { if ($stoppable && $event->isPropagationStopped()) { break; } $listener($event, $eventName, $this); } } /** * Sorts the internal list of listeners for the given event by priority. } else { $listeners = $this->getListeners($eventName); } if ($listeners) { $this->callListeners($listeners, $eventName, $event); } return $event; } try { $this->beforeDispatch($eventName, $event); try { $e = $this->stopwatch->start($eventName, 'section'); try { $this->dispatcher->dispatch($event, $eventName); } finally { if ($e->isStarted()) { $e->stop(); } } */ private function handleRaw(Request $request, int $type = self::MAIN_REQUEST): Response { // request $event = new RequestEvent($this, $request, $type); $this->dispatcher->dispatch($event, KernelEvents::REQUEST); if ($event->hasResponse()) { return $this->filterResponse($event->getResponse(), $request, $type); } { $request->headers->set('X-Php-Ob-Level', (string) ob_get_level()); $this->requestStack->push($request); try { return $this->handleRaw($request, $type); } catch (\Exception $e) { if ($e instanceof RequestExceptionInterface) { $e = new BadRequestHttpException($e->getMessage(), $e); } if (false === $catch) { $this->boot(); ++$this->requestStackSize; $this->resetServices = true; try { return $this->getHttpKernel()->handle($request, $type, $catch); } finally { --$this->requestStackSize; } } $this->request = $request; } public function run(): int { $response = $this->kernel->handle($this->request); $response->send(); if ($this->kernel instanceof TerminableInterface) { $this->kernel->terminate($this->request, $response); }$app = $app(...$args);exit( $runtime ->getRunner($app) ->run());if ($appEnv !== 'dev' && $appEnv !== 'test') { error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED); ini_set('display_errors', '0');}require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) { return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};No log messages
|
ErrorException
|
|---|
ErrorException:
Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent (sent from /home/site/wwwroot/vendor/symfony/error-handler/ErrorHandler.php on line 194)
at vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php:53
at Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler->__construct('/tmp')
(var/cache/prod/ContainerNjxa6S9/getSession_FactoryService.php:36)
at ContainerNjxa6S9\getSession_FactoryService::do(object(App_KernelProdDebugContainer), true)
(var/cache/prod/ContainerNjxa6S9/App_KernelProdDebugContainer.php:445)
at ContainerNjxa6S9\App_KernelProdDebugContainer->load('getSession_FactoryService.php')
(var/cache/prod/ContainerNjxa6S9/get_Container_Private_SessionService.php:23)
at ContainerNjxa6S9\get_Container_Private_SessionService::do(object(App_KernelProdDebugContainer), true)
(var/cache/prod/ContainerNjxa6S9/App_KernelProdDebugContainer.php:445)
at ContainerNjxa6S9\App_KernelProdDebugContainer->load('get_Container_Private_SessionService.php')
(vendor/symfony/dependency-injection/Container.php:428)
at Symfony\Component\DependencyInjection\Container->getService('services', '.container.private.session', 'get_Container_Private_SessionService', true)
(vendor/symfony/dependency-injection/Argument/ServiceLocator.php:42)
at Symfony\Component\DependencyInjection\Argument\ServiceLocator->get('session')
(vendor/symfony/http-kernel/EventListener/SessionListener.php:51)
at Symfony\Component\HttpKernel\EventListener\SessionListener->getSession()
(vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php:82)
at Symfony\Component\HttpKernel\EventListener\AbstractSessionListener->{closure:Symfony\Component\HttpKernel\EventListener\AbstractSessionListener::onKernelRequest():80}()
(vendor/symfony/http-foundation/Request.php:754)
at Symfony\Component\HttpFoundation\Request->getSession()
(vendor/symfony/http-foundation/Request.php:773)
at Symfony\Component\HttpFoundation\Request->hasPreviousSession()
(vendor/symfony/security-http/Firewall/ContextListener.php:98)
at Symfony\Component\Security\Http\Firewall\ContextListener->authenticate(object(RequestEvent))
(vendor/symfony/security-bundle/Debug/WrappedLazyListener.php:49)
at Symfony\Bundle\SecurityBundle\Debug\WrappedLazyListener->authenticate(object(RequestEvent))
(vendor/symfony/security-http/Firewall/AbstractListener.php:26)
at Symfony\Component\Security\Http\Firewall\AbstractListener->__invoke(object(RequestEvent))
(vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php:80)
at Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener->callListeners(object(RequestEvent), object(Generator))
(vendor/symfony/security-http/Firewall.php:92)
at Symfony\Component\Security\Http\Firewall->onKernelRequest(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher))
(vendor/symfony/event-dispatcher/Debug/WrappedListener.php:118)
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), 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:154)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(RequestEvent), 'kernel.request')
(vendor/symfony/http-kernel/HttpKernel.php:139)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:75)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:202)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:35)
at require_once('/home/site/wwwroot/vendor/autoload_runtime.php')
(public/index.php:11)
|