Login   |
e-Shop Znalostní báze Web stránky Tržiště 3D služby e-Konektor

Hudba, umění

    Přidat e-shop a produkty

Webexciter.com 2000-2025
Failed to start the session because headers have already been sent by "/var/www/webexciter/vendor/symfony/http-foundation/Response.php" at line 362. (500 Internal Server Error)

Symfony Exception

ErrorException RuntimeException

HTTP 500 Internal Server Error

Failed to start the session because headers have already been sent by "/var/www/webexciter/vendor/symfony/http-foundation/Response.php" at line 362.

Exceptions 2

RuntimeException

  1.         if (\PHP_SESSION_ACTIVE === session_status()) {
  2.             throw new \RuntimeException('Failed to start the session: already started by PHP.');
  3.         }
  4.         if (filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN) && headers_sent($file$line)) {
  5.             throw new \RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.'$file$line));
  6.         }
  7.         $sessionId $_COOKIE[session_name()] ?? null;
  8.         /*
  9.          * Explanation of the session ID regular expression: `/^[a-zA-Z0-9,-]{22,250}$/`.
  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): SessionBagInterface
  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 get(string $namemixed $default null): mixed
  5.     {
  6.         return $this->getAttributeBag()->get($name$default);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      */
  1.         // try to see if the locale has been set as a _locale routing parameter
  2.         if ($locale $request->attributes->get('_locale')) {
  3.             $request->getSession()->set('_locale'$locale);
  4.         } else {
  5.             // if no explicit locale has been set on this request, use one from the session
  6.             $request->setLocale($request->getSession()->get('_locale'$this->defaultLocale));
  7.         }
  8.         if(!empty($request->getSession()->get('lang'))) {
  9.             $locale $request->getSession()->get('lang')->getLangKey();
  10.         } else {
  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.         $throwable $event->getThrowable();
  2.         $request $this->duplicateRequest($throwable$event->getRequest());
  3.         try {
  4.             $response $event->getKernel()->handle($requestHttpKernelInterface::SUB_REQUESTfalse);
  5.         } catch (\Exception $e) {
  6.             $f FlattenException::createFromThrowable($e);
  7.             $this->logException($esprintf('Exception thrown when handling an exception (%s: %s at %s line %s)'$f->getClass(), $f->getMessage(), $e->getFile(), $e->getLine()));
  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.      * @throws \Exception
  2.      */
  3.     private function handleThrowable(\Throwable $eRequest $requestint $type): Response
  4.     {
  5.         $event = new ExceptionEvent($this$request$type$e);
  6.         $this->dispatcher->dispatch($eventKernelEvents::EXCEPTION);
  7.         // a listener might have replaced the exception
  8.         $e $event->getThrowable();
  9.         if (!$event->hasResponse()) {
  1.         if ($pop $request !== $this->requestStack->getMainRequest()) {
  2.             $this->requestStack->push($request);
  3.         }
  4.         try {
  5.             $response $this->handleThrowable($exception$requestself::MAIN_REQUEST);
  6.         } finally {
  7.             if ($pop) {
  8.                 $this->requestStack->pop();
  9.             }
  10.         }
  1.                         if ($hasRun) {
  2.                             throw $e;
  3.                         }
  4.                         $hasRun true;
  5.                         $kernel->terminateWithException($e$request);
  6.                     };
  7.                 }
  8.             } elseif ($event instanceof ConsoleEvent && $app $event->getCommand()->getApplication()) {
  9.                 $output $event->getOutput();
  10.                 if ($output instanceof ConsoleOutputInterface) {
in /var/www/webexciter/vendor/symfony/error-handler/ErrorHandler.php :: Symfony\Component\HttpKernel\EventListener\{closure} (line 540)
  1.             $this->exceptionHandler null;
  2.         }
  3.         try {
  4.             if (null !== $exceptionHandler) {
  5.                 return $exceptionHandler($exception);
  6.             }
  7.             $handlerException $handlerException ?: $exception;
  8.         } catch (\Throwable $handlerException) {
  9.         }
  10.         if ($exception === $handlerException && null === $this->exceptionHandler) {
ErrorHandler->handleException()

ErrorException

Warning: file_put_contents(/var/www/webexciter/var/cache/dev/profiler/82/12/fe1282): Failed to open stream: No such file or directory

  1.         if (\function_exists('gzencode')) {
  2.             $data gzencode($data3);
  3.         }
  4.         if (false === file_put_contents($file$data\LOCK_EX)) {
  5.             return false;
  6.         }
  7.         if (!$profileIndexed) {
  8.             // Add to index
  1.             if ($collector instanceof LateDataCollectorInterface) {
  2.                 $collector->lateCollect();
  3.             }
  4.         }
  5.         if (!($ret $this->storage->write($profile)) && null !== $this->logger) {
  6.             $this->logger->warning('Unable to store the profiler information.', ['configured_storage' => \get_class($this->storage)]);
  7.         }
  8.         return $ret;
  9.     }
  1.             }
  2.         }
  3.         // save profiles
  4.         foreach ($this->profiles as $request) {
  5.             $this->profiler->saveProfile($this->profiles[$request]);
  6.         }
  7.         $this->profiles = new \SplObjectStorage();
  8.         $this->parents = new \SplObjectStorage();
  9.     }
  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.      * {@inheritdoc}
  3.      */
  4.     public function terminate(Request $requestResponse $response)
  5.     {
  6.         $this->dispatcher->dispatch(new TerminateEvent($this$request$response), KernelEvents::TERMINATE);
  7.     }
  8.     /**
  9.      * @internal
  10.      */
  1.         if (false === $this->booted) {
  2.             return;
  3.         }
  4.         if ($this->getHttpKernel() instanceof TerminableInterface) {
  5.             $this->getHttpKernel()->terminate($request$response);
  6.         }
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  1.     {
  2.         $response $this->kernel->handle($this->request);
  3.         $response->send();
  4.         if ($this->kernel instanceof TerminableInterface) {
  5.             $this->kernel->terminate($this->request$response);
  6.         }
  7.         return 0;
  8.     }
  9. }
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/var/www/webexciter/vendor/autoload_runtime.php') in /var/www/webexciter/public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Stack Traces 2

[2/2] RuntimeException
RuntimeException:
Failed to start the session because headers have already been sent by "/var/www/webexciter/vendor/symfony/http-foundation/Response.php" at line 362.

  at /var/www/webexciter/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:135
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
     (/var/www/webexciter/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:326)
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->getBag()
     (/var/www/webexciter/vendor/symfony/http-foundation/Session/Session.php:258)
  at Symfony\Component\HttpFoundation\Session\Session->getBag()
     (/var/www/webexciter/vendor/symfony/http-foundation/Session/Session.php:278)
  at Symfony\Component\HttpFoundation\Session\Session->getAttributeBag()
     (/var/www/webexciter/vendor/symfony/http-foundation/Session/Session.php:78)
  at Symfony\Component\HttpFoundation\Session\Session->get()
     (/var/www/webexciter/src/EventListener/LocaleListener.php:78)
  at App\EventListener\LocaleListener->__invoke()
     (/var/www/webexciter/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:115)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (/var/www/webexciter/vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (/var/www/webexciter/vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (/var/www/webexciter/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:153)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (/var/www/webexciter/vendor/symfony/http-kernel/HttpKernel.php:139)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (/var/www/webexciter/vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (/var/www/webexciter/vendor/symfony/http-kernel/EventListener/ErrorListener.php:91)
  at Symfony\Component\HttpKernel\EventListener\ErrorListener->onKernelException()
     (/var/www/webexciter/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:115)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (/var/www/webexciter/vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (/var/www/webexciter/vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (/var/www/webexciter/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:153)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (/var/www/webexciter/vendor/symfony/http-kernel/HttpKernel.php:223)
  at Symfony\Component\HttpKernel\HttpKernel->handleThrowable()
     (/var/www/webexciter/vendor/symfony/http-kernel/HttpKernel.php:114)
  at Symfony\Component\HttpKernel\HttpKernel->terminateWithException()
     (/var/www/webexciter/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php:125)
  at Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::Symfony\Component\HttpKernel\EventListener\{closure}()
     (/var/www/webexciter/vendor/symfony/error-handler/ErrorHandler.php:540)
  at Symfony\Component\ErrorHandler\ErrorHandler->handleException()                
[1/2] ErrorException
ErrorException:
Warning: file_put_contents(/var/www/webexciter/var/cache/dev/profiler/82/12/fe1282): Failed to open stream: No such file or directory

  at /var/www/webexciter/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php:164
  at Symfony\Component\HttpKernel\Profiler\FileProfilerStorage->write()
     (/var/www/webexciter/vendor/symfony/http-kernel/Profiler/Profiler.php:100)
  at Symfony\Component\HttpKernel\Profiler\Profiler->saveProfile()
     (/var/www/webexciter/vendor/symfony/http-kernel/EventListener/ProfilerListener.php:135)
  at Symfony\Component\HttpKernel\EventListener\ProfilerListener->onKernelTerminate()
     (/var/www/webexciter/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:115)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (/var/www/webexciter/vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (/var/www/webexciter/vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (/var/www/webexciter/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:153)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (/var/www/webexciter/vendor/symfony/http-kernel/HttpKernel.php:97)
  at Symfony\Component\HttpKernel\HttpKernel->terminate()
     (/var/www/webexciter/vendor/symfony/http-kernel/Kernel.php:159)
  at Symfony\Component\HttpKernel\Kernel->terminate()
     (/var/www/webexciter/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:39)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (/var/www/webexciter/vendor/autoload_runtime.php:29)
  at require_once('/var/www/webexciter/vendor/autoload_runtime.php')
     (/var/www/webexciter/public/index.php:5)